title: IValueConverter return int array
body: <p>hi I'm editing a calendar. Now I need to fill the calendar with my favorite days.
  <br>That's what I tried and that's the output</p>
  
  <pre><code>object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
  {
      int[] days = new int[] { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
      return days;
  }
  </code></pre>
  
  <p>and this is xaml:</p>
  
  <pre><code>&lt;ContentPresenter
  x:Name="NormalText"
  Content="{Binding Converter={StaticResource GeorgianToPersianDate}}"
  /&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jGQOj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jGQOj.png" alt="enter image description here"></a></p>
  
  <p>UPDATE:</p>
  
  <pre><code>&lt;Style x:Key="CalendarDayButtonStyle" TargetType="CalendarDayButton"&gt;
  
          &lt;Setter Property="MinWidth" Value="10" /&gt;
          &lt;Setter Property="MinHeight" Value="10" /&gt;
          &lt;Setter Property="FontSize" Value="12" /&gt;
          &lt;Setter Property="Width" Value="32" /&gt;
          &lt;Setter Property="Height" Value="32" /&gt;
          &lt;Setter Property="HorizontalContentAlignment" Value="Center" /&gt;
          &lt;Setter Property="VerticalContentAlignment" Value="Center" /&gt;
          &lt;Setter Property="FocusVisualStyle" Value="{x:Null}" /&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="CalendarDayButton"&gt;
                      &lt;ControlTemplate.Resources&gt;
                          &lt;local:GeorgianToPersianDate x:Key="GeorgianToPersianDate" /&gt;
                      &lt;/ControlTemplate.Resources&gt;
                      &lt;Grid&gt;
                          &lt;Rectangle
                              x:Name="TodayBackground"
                              Fill="{DynamicResource DangerBrush}"
                              Opacity="0"
                              RadiusX="16"
                              RadiusY="16" /&gt;
                          &lt;Rectangle
                              x:Name="SelectedBackground"
                              Fill="{DynamicResource PrimaryBrush}"
                              Opacity="0"
                              RadiusX="16"
                              RadiusY="16" /&gt;
                          &lt;ContentPresenter
                              x:Name="NormalText"
                              Content="{Binding Converter={StaticResource GeorgianToPersianDate}}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"&gt;
                              &lt;TextElement.Foreground&gt;
                                  &lt;SolidColorBrush Color="{DynamicResource PrimaryTextColor}" /&gt;
                              &lt;/TextElement.Foreground&gt;
                          &lt;/ContentPresenter&gt;
                          &lt;VisualStateManager.VisualStateGroups&gt;
                              &lt;VisualStateGroup x:Name="CommonStates"&gt;
                                  &lt;VisualStateGroup.Transitions&gt;
                                      &lt;VisualTransition GeneratedDuration="0:0:0.1" /&gt;
                                  &lt;/VisualStateGroup.Transitions&gt;
                                  &lt;VisualState x:Name="Normal" /&gt;
                                  &lt;VisualState x:Name="Disabled"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;DoubleAnimation
                                              Storyboard.TargetName="NormalText"
                                              Storyboard.TargetProperty="Opacity"
                                              To=".35"
                                              Duration="0" /&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                              &lt;/VisualStateGroup&gt;
                              &lt;VisualStateGroup x:Name="SelectionStates"&gt;
                                  &lt;VisualStateGroup.Transitions&gt;
                                      &lt;VisualTransition GeneratedDuration="0" /&gt;
                                  &lt;/VisualStateGroup.Transitions&gt;
                                  &lt;VisualState x:Name="Unselected" /&gt;
                                  &lt;VisualState x:Name="Selected"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;DoubleAnimation
                                              Storyboard.TargetName="SelectedBackground"
                                              Storyboard.TargetProperty="Opacity"
                                              To="1"
                                              Duration="0:0:.2" /&gt;
                                          &lt;ColorAnimation
                                              Storyboard.TargetName="NormalText"
                                              Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                              To="White"
                                              Duration="0" /&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                              &lt;/VisualStateGroup&gt;
                              &lt;VisualStateGroup x:Name="ActiveStates"&gt;
                                  &lt;VisualStateGroup.Transitions&gt;
                                      &lt;VisualTransition GeneratedDuration="0" /&gt;
                                  &lt;/VisualStateGroup.Transitions&gt;
                                  &lt;VisualState x:Name="Active" /&gt;
                                  &lt;VisualState x:Name="Inactive"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;ColorAnimation
                                              Storyboard.TargetName="NormalText"
                                              Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                              To="{DynamicResource ThirdlyTextColor}"
                                              Duration="0" /&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                              &lt;/VisualStateGroup&gt;
                              &lt;VisualStateGroup x:Name="DayStates"&gt;
                                  &lt;VisualStateGroup.Transitions&gt;
                                      &lt;VisualTransition GeneratedDuration="0" /&gt;
                                  &lt;/VisualStateGroup.Transitions&gt;
                                  &lt;VisualState x:Name="RegularDay" /&gt;
                                  &lt;VisualState x:Name="Today"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;DoubleAnimation
                                              Storyboard.TargetName="TodayBackground"
                                              Storyboard.TargetProperty="Opacity"
                                              To="1"
                                              Duration="0" /&gt;
                                          &lt;ColorAnimation
                                              Storyboard.TargetName="NormalText"
                                              Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)"
                                              To="White"
                                              Duration="0" /&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                              &lt;/VisualStateGroup&gt;
                          &lt;/VisualStateManager.VisualStateGroups&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>this is my xaml i just want to remove dafault days and add my own days i I thought I could do this with the converter. So how can I change the days if I can not do this with the converter?</p>