none
How to specify greater than or equal to in xml?

    Question

  •  

     

     <Item value="2" text="&gt; 80%"/>

    <

     

     Exact Requirment is to show >=80%

    Thanks in Advacnce,

    Ankit

     Hi,

    I need to specify greater than or equal to in xml.  I have applied greater and less than as mentioned below.

     

    Item value="3" text="&lt; 80%"/>

    Thursday, April 22, 2010 12:41 PM

Answers

  • Hi,

     

    I think you can just use >= in the attribute value. I've checked this in xaml with a combobox and it works.

    <ComboBox >
     <ComboBox.Items>
      <ComboBoxItem Content=">=80" />
     </ComboBox.Items>
    </ComboBox>

    • Marked as answer by Kira Qian Wednesday, April 28, 2010 7:35 AM
    Thursday, April 22, 2010 1:19 PM
  • Hi ankit,

     

    XAML use the same escape character as HTML. In XAML, you can directly use “>=” like this.

    <TextBlock Text=">=20"></TextBlock>

    But you need to use escape character for “<=”

    <TextBlock Text="&lt;=20"></TextBlock>

     

    Sincerely,

    Kira Qian
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Kira Qian Wednesday, April 28, 2010 7:35 AM
    Monday, April 26, 2010 8:28 AM

All replies

  • Hi,

     

    I think you can just use >= in the attribute value. I've checked this in xaml with a combobox and it works.

    <ComboBox >
     <ComboBox.Items>
      <ComboBoxItem Content=">=80" />
     </ComboBox.Items>
    </ComboBox>

    • Marked as answer by Kira Qian Wednesday, April 28, 2010 7:35 AM
    Thursday, April 22, 2010 1:19 PM
  • Hi ankit,

     

    XAML use the same escape character as HTML. In XAML, you can directly use “>=” like this.

    <TextBlock Text=">=20"></TextBlock>

    But you need to use escape character for “<=”

    <TextBlock Text="&lt;=20"></TextBlock>

     

    Sincerely,

    Kira Qian
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by Kira Qian Wednesday, April 28, 2010 7:35 AM
    Monday, April 26, 2010 8:28 AM
  • Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    Wednesday, April 28, 2010 7:36 AM