예제 #1
0
        /// <summary>
        /// ImageSourceProperty property changed handler.
        /// </summary>
        /// <param name="d">LiveTile that changed its ImageSource.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnImageSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LiveTile source = d as LiveTile;
            Uri      value  = e.NewValue as Uri;

            source.OnImageSourceChanged(value);
        }
예제 #2
0
        /// <summary>
        /// TileSizeProperty property changed handler.
        /// </summary>
        /// <param name="d">LiveTile that changed its TileSize.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnTileSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            LiveTile source = d as LiveTile;
            double   value  = (double)e.NewValue;

            source.DoubleTileSize       = value * 2;
            source.NegativeTileSize     = -value;
            source.HalfTileSize         = value / 2;
            source.NegativeHalfTileSize = -(value / 2);
        }