Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Show only popup of DateTimePicker

$
0
0
Hi,

You could use a DropDownButton with a DropDownContent containing the Calendars and TimePicker :
<Grid>
      <xctk:DropDownButton x:Name="_dropDownButton"
                           Margin="10"
                           Width="150"
                           Height="25"
                           Content="Click Me">
         <xctk:DropDownButton.DropDownContent>
            <StackPanel>
               <Calendar />
               <xctk:TimePicker />
            </StackPanel>
         </xctk:DropDownButton.DropDownContent>
      </xctk:DropDownButton>
   </Grid>
Or use a button and on the Click event, show a childWindow containing the Calendar and TimePicker :
<Grid>
      <Button Margin="10"
              Width="150"
              Height="25"
              Content="Click Me"
              Click="Button_Click_1"/>

      <xctk:WindowContainer x:Name="_windowContainer"
                            ModalBackgroundBrush="#80000000">

         <xctk:ChildWindow x:Name="_modalChildWindow"
                           Caption="Modal ChildWindow"
                           IsModal="True"
                           Left="175"
                           Top="50"
                           WindowState="Closed">
            <StackPanel>
               <Calendar />
               <xctk:TimePicker />
            </StackPanel>
         </xctk:ChildWindow>
      </xctk:WindowContainer>
   </Grid>


private void Button_Click_1( object sender, RoutedEventArgs e )
    {
      _modalChildWindow.WindowState = Xceed.Wpf.Toolkit.WindowState.Open;
    }

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>