Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
GeneralRe: parallel programming in c#????????? Pin
Scott Dorman30-Aug-07 15:57
professionalScott Dorman30-Aug-07 15:57 
GeneralRe: parallel programming in c#????????? Pin
Judah Gabriel Himango30-Aug-07 17:13
sponsorJudah Gabriel Himango30-Aug-07 17:13 
GeneralRe: parallel programming in c#????????? Pin
Patrick Etc.30-Aug-07 18:08
Patrick Etc.30-Aug-07 18:08 
GeneralRe: parallel programming in c#????????? Pin
Judah Gabriel Himango31-Aug-07 3:53
sponsorJudah Gabriel Himango31-Aug-07 3:53 
GeneralRe: parallel programming in c#????????? Pin
Patrick Etc.31-Aug-07 4:50
Patrick Etc.31-Aug-07 4:50 
GeneralRe: parallel programming in c#????????? Pin
Scott Dorman31-Aug-07 5:53
professionalScott Dorman31-Aug-07 5:53 
GeneralRe: parallel programming in c#????????? Pin
pbraun31-Aug-07 5:52
pbraun31-Aug-07 5:52 
GeneralRe: parallel programming in c#????????? Pin
Judah Gabriel Himango31-Aug-07 8:11
sponsorJudah Gabriel Himango31-Aug-07 8:11 
GeneralRe: parallel programming in c#????????? Pin
pbraun31-Aug-07 10:53
pbraun31-Aug-07 10:53 
GeneralRe: parallel programming in c#????????? Pin
Judah Gabriel Himango1-Sep-07 8:50
sponsorJudah Gabriel Himango1-Sep-07 8:50 
AnswerRe: parallel programming in c#????????? Pin
ekynox30-Aug-07 15:38
ekynox30-Aug-07 15:38 
GeneralRe: parallel programming in c#????????? Pin
Judah Gabriel Himango31-Aug-07 4:07
sponsorJudah Gabriel Himango31-Aug-07 4:07 
AnswerRe: parallel programming in c#????????? Pin
Scott Dorman30-Aug-07 15:56
professionalScott Dorman30-Aug-07 15:56 
GeneralRe: parallel programming in c#????????? Pin
Patrick Etc.30-Aug-07 18:10
Patrick Etc.30-Aug-07 18:10 
GeneralRe: parallel programming in c#????????? Pin
Scott Dorman31-Aug-07 5:47
professionalScott Dorman31-Aug-07 5:47 
GeneralRe: parallel programming in c#????????? Pin
ekynox30-Aug-07 19:07
ekynox30-Aug-07 19:07 
GeneralRe: parallel programming in c#????????? Pin
Scott Dorman31-Aug-07 5:45
professionalScott Dorman31-Aug-07 5:45 
GeneralRegAsm Pin
lost in transition 30-Aug-07 11:37
lost in transition 30-Aug-07 11:37 
GeneralRe: RegAsm Pin
Judah Gabriel Himango30-Aug-07 17:19
sponsorJudah Gabriel Himango30-Aug-07 17:19 
QuestionLook and Feel of Winforms Applications Pin
kaminem30-Aug-07 9:50
kaminem30-Aug-07 9:50 
AnswerRe: Look and Feel of Winforms Applications Pin
Scott Dorman30-Aug-07 10:14
professionalScott Dorman30-Aug-07 10:14 
AnswerRe: Look and Feel of Winforms Applications Pin
PIEBALDconsult30-Aug-07 11:32
mvePIEBALDconsult30-Aug-07 11:32 
AnswerRe: Look and Feel of Winforms Applications Pin
Patrick Etc.30-Aug-07 18:19
Patrick Etc.30-Aug-07 18:19 
AnswerRe: Look and Feel of Winforms Applications Pin
kaminem30-Aug-07 22:34
kaminem30-Aug-07 22:34 
QuestionBinding A StaticResource to a XPath expression Pin
User 309585930-Aug-07 8:36
User 309585930-Aug-07 8:36 
I have to bind a Rectangle's Fill to a Brush ,both of them being declared in '<'App.Resources'>'

It is a easy task using StaticResource for the Fill property

So I've something like this:

I'm using quotes sign so the code can be viewed

'<'Application.Resources'>'

'<'DrawingBrush x:Key="id" x:Name="name"/'>'

'<'DataTemplate DataType="item"'>'

'<'Rectangle Width="30" Height="30" Fill="{StaticResource id}"/'>'

'<'/DataTemplate'>'

'<'/Application.Resources'>'



The hard part is that I want to bind the name of the Brush to the item's BrushID attribute ( as item is a XML element ) ... the name of the brush I want to use is accesible by XPath=@Brush.

so the code should look like this



'<'Application.Resources'>'

'<'DrawingBrush x:Key="id" x:Name="name"/'>'

'<'DataTemplate DataType="item"'>'

'<'Rectangle Width="30" Height="30" Fill="{StaticResource XPath=@BrushID}"/'>'

'<'/DataTemplate'>'

'<'/Application.Resources'>'



BUT



It seems that StaticResource doesn't support XPath.

How should I do this ?

Can anyone help me?



I'm looking forward to your reply.


Mihai

modified 30-Nov-21 21:01pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.