예제 #1
0
 public ExampleView()
 {
     HorizontalAlignment = HorizontalAlignment.Left;
     Foreground          = SolidColorBrushes.White.Brush;
     Margin = Thickness.InPixels(3);
     Layout = PixyLayout.TextRightOfImage;
     Gap    = Length.InPixels(16);
     SetBinding(TextProperty, new Lesarde.Frogui.Data.Binding(nameof(Example.DisplayName)));
     SetBinding(ImageSourceProperty, new Lesarde.Frogui.Data.Binding(nameof(Example.Icon)));
 }
예제 #2
0
        public BrushEditor()
        {
            BorderThickness = Thickness.InPixels(1);
            BorderBrush     = SolidColorBrushes.Gray.Brush;
            MinWidth        = Length.InPixels(100);
            Height          = Length.InPixels(40);
            CornerRadius    = CornerRadius.InPixels(3);

            IsHitTestVisible = true;

            PointerClick += BrushZoomer_PointerClick;
        }
예제 #3
0
        public StringView()
        {
            Foreground                 = SolidColorBrushes.White.Brush;
            FontSize                   = Lesarde.Frogui.Media.FontSize.FromKind(Lesarde.Frogui.Media.FontSizeKind.Large);
            FontWeight                 = Lesarde.Frogui.Media.FontWeight.FromKind(Lesarde.Frogui.Media.FontWeightKind.Normal);
            TextShadowColor            = (SolidColorBrush)SolidColorBrushes.Black.Brush;
            TextShadowBlur             = Length.InPixels(3);
            TextShadowHorizontalOffset = Length.InPixels(1);
            TextShadowVerticalOffset   = Length.InPixels(1);
            VerticalAlignment          = VerticalAlignment.Center;
            Padding = Thickness.InPixels(2);
            Margin  = new Thickness(Length.InPixels(4), Length.InPixels(0), Length.InPixels(4), Length.InPixels(0));

            // When the data context changes update the Text property
            AddPropertyChangedListener(Element.DataContextProperty, v => { Text = v?.ToString(); });
        }