Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
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.

QuestionMy C#&micro based project Pin
shaikhooo30-Aug-07 8:03
shaikhooo30-Aug-07 8:03 
AnswerRe: My C#&micro based project Pin
Luc Pattyn30-Aug-07 8:14
sitebuilderLuc Pattyn30-Aug-07 8:14 
GeneralRe: My C#&micro based project Pin
ChrisKo31-Aug-07 13:24
ChrisKo31-Aug-07 13:24 
QuestionHelp using C++ DLL.. Pin
Dio2230-Aug-07 7:51
Dio2230-Aug-07 7:51 
AnswerRe: Help using C++ DLL.. Pin
leppie31-Aug-07 3:44
leppie31-Aug-07 3:44 
GeneralRe: Help using C++ DLL.. Pin
Dio2231-Aug-07 9:52
Dio2231-Aug-07 9:52 
Questionc# Pin
lankaudaranga30-Aug-07 7:29
lankaudaranga30-Aug-07 7:29 
AnswerRe: c# Pin
pmarfleet30-Aug-07 8:01
pmarfleet30-Aug-07 8:01 
GeneralRe: c# Pin
seeitsharper30-Aug-07 10:07
seeitsharper30-Aug-07 10:07 
GeneralRe: c# Pin
Colin Angus Mackay30-Aug-07 12:08
Colin Angus Mackay30-Aug-07 12:08 
QuestionTextBox in menustrip Pin
topksharma198230-Aug-07 7:10
topksharma198230-Aug-07 7:10 
AnswerRe: TextBox in menustrip Pin
Judah Gabriel Himango30-Aug-07 17:30
sponsorJudah Gabriel Himango30-Aug-07 17:30 
QuestionDatagrid sort Pin
ramdil30-Aug-07 6:26
ramdil30-Aug-07 6:26 
AnswerRe: Datagrid sort Pin
J$30-Aug-07 13:55
J$30-Aug-07 13:55 
GeneralRe: Datagrid sort Pin
ramdil30-Aug-07 23:14
ramdil30-Aug-07 23:14 
QuestionSaving string in resources file .... Question [modified] Pin
Yanshof30-Aug-07 5:40
Yanshof30-Aug-07 5:40 
QuestionHow to get wan ip? Pin
Opa Knack30-Aug-07 5:05
Opa Knack30-Aug-07 5:05 

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.