-
December 7th, 2009, 07:55 AM
#1
property value inheritance
It is perfectly fine to write something like that:
<StackPanel TextBlock.FontWeight="Bold">
<Label>dasdas</Label>
<Grid>
<Label>dfasdass</Label>
</Grid>
</StackPanel>
But why it is not possible to set fontweight only for labels by writing Label.FontWeight="Bold" ?
Thank you for help in advance
-
December 7th, 2009, 04:54 PM
#2
Re: property value inheritance
Originally Posted by yoyosh
But why it is not possible to set fontweight only for labels by writing Label.FontWeight="Bold" ?
Post the xaml code for what you have in mind. It's not clear where you would like to set the Label.FontWeight property.
-
December 11th, 2009, 11:34 AM
#3
Re: property value inheritance
Hi,
I would like to set it exactly instead of "TextBlock.FontWeight="Bold"", so to have:
<StackPanel Label.FontWeight="Bold">
<Label>dasdas</Label>
<Grid>
<Label>dfasdass</Label>
</Grid>
</StackPanel>
-
December 11th, 2009, 02:47 PM
#4
Re: property value inheritance
Create a style for the Label and set it in there.
-
December 14th, 2009, 07:28 AM
#5
Re: property value inheritance
That`s ok, but why it is not possible with Label while it is possible with TextBlock?
-
December 15th, 2009, 01:25 PM
#6
Re: property value inheritance
TextBlock is a FrameworkElement, Label is a ContentControl.
They are derived from different classes, thus different DependencyProperty's.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|