Tom Knowlton
asked on
XAML - How to add new property to a Button?
In XAML / C# - is it possible to add a custom attribute or property to a <Button/> that is an enumeration?
"Kind" would give intellisense (code completion) options of "Addition, Subtraction, Multiplication, Division"
In the C# code behind, something like this:
How do you code it? Do you inherit from Button?
<Button x:Name="acButton"
Content="/"
Margin="5"
Grid.Row="1"
[b]Kind="Division"[/b]
Grid.Column="0"/>
"Kind" would give intellisense (code completion) options of "Addition, Subtraction, Multiplication, Division"
In the C# code behind, something like this:
public enum SelectedOperator
{
Addition,
Subtraction,
Multiplication,
Division
}
How do you code it? Do you inherit from Button?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you give me a simple example?