0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Visual Studio / WPF > コントロール > Calendar > DisplayModeにより表示期間を変更可能

Last updated at Posted at 2017-04-25
動作環境
Windows 7 Pro (32bit)
Microsoft Visual Studio 2017 Community
Sublime Text 2

@ WPF 4.5入門 by 大田一希さん
No.3704 / 9985

表示内容を1ヶ月、1年、10年に設定できます

試してみた。
ついでに<StackPanel>のOrientationプロパティも使った。

XAML
<Window x:Class="_170425_t1645_calendar.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:_170425_t1645_calendar"
        mc:Ignorable="d"
        Title="MainWindow" Height="377.358" Width="550.472">
    <Grid>
        <StackPanel Margin="0,30,0,-28" Orientation="Horizontal">
            <Calendar x:Name="calendar_months" HorizontalAlignment="Left"/>
            <Calendar x:Name="calendar_years" DisplayMode="Year"/>
            <Calendar x:Name="calendar_decades" DisplayMode="Decade"/>
        </StackPanel>
    </Grid>
</Window>

work.png

リンク

日本語がおかしい部分がある。

使用して、 SelectionModeです。

原文は「Use the SelectionMode」。
訳文の改善を送っておいた。

他の部分の訳もあやしいかもしれない。
英語版の文書はページ上部の「英語」ラジオボタンをオンにすれば見ることができる。
関連部分のマウスオーバーでも対応英語が読めるが全体の見通しは悪い。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?