private void CreateBindings()
        {
            ImageGrid.SetBinding(ToolTipProperty, new Binding("ItemTooltip")
            {
                Source = _model,
                Mode   = BindingMode.OneWay
            });

            Label.SetBinding(ContentProperty, new Binding("TransformationLabel")
            {
                Source = _model,
                Mode   = BindingMode.OneWay
            });

            RootGrid.SetBinding(VisibilityProperty, new Binding("Visibility")
            {
                Source = _model,
                Mode   = BindingMode.OneWay
            });

            Ring.SetBinding(VisibilityProperty, new Binding("RingVisibility")
            {
                Source = _model,
                Mode   = BindingMode.OneWay
            });
        }
예제 #2
0
        private void CreateBindings()
        {
            Image.SetBinding(Image.SourceProperty, new Binding("Image")
            {
                Source = (BaseModel)CenteredImageModel ?? Model,
                Mode   = BindingMode.OneWay
            });
            Image.SetBinding(MarginProperty, new Binding("FormattedMargin")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });

            ImageGrid.SetBinding(HeightProperty, new Binding("Height")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
            ImageGrid.SetBinding(WidthProperty, new Binding("Width")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
            ImageGrid.SetBinding(VisibilityProperty, new Binding("Visibility")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
            ImageGrid.SetBinding(RenderTransformProperty, new Binding("Translate")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
            ImageGrid.SetBinding(CursorProperty, new Binding("Cursor")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });

            TooltipControl.SetBinding(ContentProperty, new Binding("Tooltip")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
            TooltipControl.SetBinding(VisibilityProperty, new Binding("TooltipVisibility")
            {
                Source = Model,
                Mode   = BindingMode.OneWay
            });
        }
예제 #3
0
 private void CreateBindings()
 {
     ImageGrid.SetBinding(HeightProperty, new Binding("Height")
     {
         Source = Model,
         Mode   = BindingMode.OneWay
     });
     ImageGrid.SetBinding(WidthProperty, new Binding("Width")
     {
         Source = Model,
         Mode   = BindingMode.OneWay
     });
     ImageGrid.SetBinding(VisibilityProperty, new Binding("Visibility")
     {
         Source = Model,
         Mode   = BindingMode.OneWay
     });
     ImageGrid.SetBinding(RenderTransformProperty, new Binding("Translate")
     {
         Source = Model,
         Mode   = BindingMode.OneWay
     });
 }