コード例 #1
0
        /// <summary>
        /// Create the static resources required for a FluidTrade.FluidTradeClient.ViewerDebtBlotter.
        /// </summary>
        static ViewerDebtBlotter()
        {
            // AnimationSpeed Property
            ViewerDebtBlotter.AnimationSpeedProperty = DependencyProperty.Register(
                "AnimationSpeed",
                typeof(AnimationSpeed),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(AnimationSpeed.Off, new PropertyChangedCallback(OnAnimationSpeedChanged)));

            // IsFilledFilter Property
            ViewerDebtBlotter.IsFilledFilterProperty = DependencyProperty.Register(
                "IsFilledFilter",
                typeof(Boolean),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsFilledFilterChanged)));

            // IsHeaderFrozen Property
            ViewerDebtBlotter.IsHeaderFrozenProperty = DependencyProperty.Register(
                "IsHeaderFrozen",
                typeof(Boolean),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(true, new PropertyChangedCallback(OnIsHeaderFrozenChanged)));

            // IsLayoutFrozen Property
            ViewerDebtBlotter.IsLayoutFrozenProperty = DependencyProperty.Register(
                "IsLayoutFrozen",
                typeof(Boolean),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(true, new PropertyChangedCallback(OnIsLayoutFrozenChanged)));

            // IsNavigationPaneVisible Property
            ViewerDebtBlotter.IsNavigationPaneVisibleProperty = DependencyProperty.Register(
                "IsNavigationPaneVisible",
                typeof(Boolean),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(true, new PropertyChangedCallback(OnIsNavigationPaneVisibleChanged)));

            // IsRunningFilter Property
            ViewerDebtBlotter.IsRunningFilterProperty = DependencyProperty.Register(
                "IsRunningFilter",
                typeof(Boolean),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsRunningFilterChanged)));

            // Scale Property
            ViewerDebtBlotter.ScaleProperty = DependencyProperty.Register(
                "Scale",
                typeof(Double),
                typeof(ViewerDebtBlotter),
                new FrameworkPropertyMetadata(1.0, new PropertyChangedCallback(OnScaleChanged)));

            // For performance purposes, a single, shared report is used to display all content.  Since the greatest delays are incurred when elements are
            // removed and added to the visual tree, recycling the same report makes things appear quicker because the visual elements remain in place but the
            // data bindings to those elements points to the new content.
            ViewerDebtBlotter.reportWorkingOrder = new ReportDebtWorkingOrder();
            ViewerDebtBlotter.reportMatch        = new ReportMatch();
            ViewerDebtBlotter.reportExecution    = new ExecutionReport();
            ViewerDebtBlotter.negotiationConsole = new NegotiationConsole();
        }
コード例 #2
0
        /// <summary>
        /// Handles a change to the animation speed.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnAnimationSpeedChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Set the speed for animation.
            ReportMatch    reportPrototype = dependencyObject as ReportMatch;
            AnimationSpeed animationSpeed  = (AnimationSpeed)dependencyPropertyChangedEventArgs.NewValue;

            reportPrototype.Duration = ReportMatch.animationDurations[(Int32)animationSpeed];
        }