public enum StatusType { Start, Pause, Stop } public class Plugin { private StatusType status_; private String imageStatusPath_; public Plugin() { SetStatus(StatusType.Stop); } public void SetStatus(StatusType status) { status_ = status; if (status == StatusType.Stop) imageStatusPath_ = "Resources/Stop_24.png"; if (status == StatusType.Pause) imageStatusPath_ = "Resources/Pause_24.png"; if (status == StatusType.Start) imageStatusPath_ = "Resources/Play_24.png"; } public String ImageStatusPath { get { return imageStatusPath_; } }
<Image Width="24" Height="24" HorizontalAlignment="Left" VerticalAlignment="Top"> <Image.Source> <BitmapImage UriSource="{Binding ImageStatusPath}"/> </Image.Source> </Image>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)