Interaction logic for ucCalendar.xaml
Inheritance: System.Windows.Controls.UserControl, INotifyPropertyChanged
Ejemplo n.º 1
0
        public PageCalendar()
        {
            InitializeComponent();

            this.Uid = "1000";
            this.Title = Translator.GetInstance().GetString("PageCalendar", this.Uid);

            StackPanel calendarPanel = new StackPanel();
            calendarPanel.Margin = new Thickness(10, 0, 10, 0);

            cbShowAll = new CheckBox();
            cbShowAll.Content = Translator.GetInstance().GetString("PageCalendar","200");
            cbShowAll.FlowDirection = System.Windows.FlowDirection.RightToLeft;
            cbShowAll.Checked += new RoutedEventHandler(cbShowAll_Checked);
            cbShowAll.Unchecked += new RoutedEventHandler(cbShowAll_Unchecked);
            cbShowAll.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            cbShowAll.IsChecked = false;

            calendarPanel.Children.Add(cbShowAll);

            ScrollViewer viewer = new ScrollViewer();
            viewer.MaxHeight = GraphicsHelpers.GetContentHeight() - 50;

            ucCalendar = new ucCalendar();

            viewer.Content = ucCalendar;

            calendarPanel.Children.Add(viewer);

            base.setContent(calendarPanel);

            base.setHeaderContent(this.Title);

            showPage(this);
        }
Ejemplo n.º 2
0
        private static void OnShowAllPropertyChanged(DependencyObject source,
                                                     DependencyPropertyChangedEventArgs e)
        {
            ucCalendar control = source as ucCalendar;

            control.showMonth();
        }