Interaction logic for ucCalendar.xaml
Inheritance: System.Windows.Controls.UserControl, INotifyPropertyChanged
コード例 #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);
        }
コード例 #2
0
ファイル: ucCalendar.xaml.cs プロジェクト: petfol/tap-desktop
        private static void OnShowAllPropertyChanged(DependencyObject source,
                                                     DependencyPropertyChangedEventArgs e)
        {
            ucCalendar control = source as ucCalendar;

            control.showMonth();
        }