zoukankan      html  css  js  c++  java
  • Dependency property changed example

    public double ScaleFactor
    {
        get { return (double)GetValue(ScaleFactorProperty); }
        set { SetValue(ScaleFactorProperty, value); }
    }
    
    // Using a DependencyProperty as the backing store for ScaleFactor.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty ScaleFactorProperty =
        DependencyProperty.Register("ScaleFactor", typeof(double), typeof(ToolBlockControl), 
    new UIPropertyMetadata(1.0,new PropertyChangedCallback(ScaleFactorChangedCallBack))); private static void ScaleFactorChangedCallBack(DependencyObject obj, DependencyPropertyChangedEventArgs args) { var toolBlockControl = obj as ToolBlockControl; double scaleFactor = (double)args.NewValue; toolBlockControl.Width = toolBlockControl.mActualWidth * scaleFactor; toolBlockControl.Height = toolBlockControl.mActualHeight * scaleFactor; }
  • 相关阅读:
    矩阵快速幂---BestCoder Round#8 1002
    行列式及其基本性质
    排列,逆序
    扩展欧几里得
    AC automation 模板
    hdu2897 巴什博奕
    hdu2188 巴什博奕
    hdu1846 巴什博奕
    hdu2149 巴什博奕
    【转】博弈基础
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1258294.html
Copyright © 2011-2022 走看看