This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Works--> | |
<Image Source="resm:CrossTestAppAvalonia.Images.info2_blue.png" Width="32" Height="32" Margin="5"/> | |
<!--Works--> | |
<Image Source="resm:CrossTestAppAvalonia.Images.warning2_yellow.png" Width="32" Height="32" Margin="5"/> | |
<!--Works--> | |
<TextBox Name="textbox" Margin="5"> | |
<i:Interaction.Behaviors> | |
<ia:DataTriggerBehavior Binding="{Binding MyProperty.Boolean}" ComparisonCondition="Equal" Value="true"> | |
<ia:ChangePropertyAction TargetObject="{Binding #textbox}" PropertyName="Text" Value="info2_blue.png" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Avalonia; | |
using Avalonia.Controls; | |
using Avalonia.Media; | |
using Avalonia.Media.Imaging; | |
using Avalonia.Platform; | |
using System; | |
namespace Test.Desktop | |
{ | |
public class MyImage : Control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GuiStateTemplate : DataTemplate, IDataTemplate | |
{ | |
[TypeConverter(typeof(EnumConverter))] | |
public GuiState State { get; set; } | |
bool IDataTemplate.Match(object data) | |
{ | |
var enumVal = (GuiState)Enum.Parse(typeof(GuiState), data.ToString()); | |
var result = State == enumVal; | |
Logging.Debug(string.Format("GuiStateTemplate Match: {0} == {1} ({2})", State, enumVal, result)); |
OlderNewer