silverlightstyleslabeldatafield

Bold single word inside Silverlight DataField label


Imagine I have a simple DataField in my Silverlight app. something like this:

<toolkit:DataField Label="This is my test label:">
  <TextBox ... etc... />
</toolkit:DataField>

Is it possible to style the label in above example so that only the word "test" is bold?


Solution

  • you can use Run tag inside a textblock tag like this :

    <toolkit:DataField >
         <toolkit:DataField.Label>
             <TextBlock >This is my <Run FontWeight="Bold">test</Run>label</TextBlock>
         </toolkit:DataField.Label>  
        <TextBox ... etc... />
    </toolkit:DataField>
    

    i hope that it fixe your pb.