none
ComboBox MaxDropDownHeight property Default value is differ in UWP and WPF RRS feed

  • Question

  • Hi support,

    I have placed the combo box in my Xaml design in WPF and bind the MaxDropDownHeight property value to the text box i have done same think in UWP.

    After we run WPF application. we got maximum DropDownHeight as 250 but we done same in UWP we got maximum dropdown Height as infinite. Can We know why this Difference happen.

    UWP APP Xaml Code:

    <Page
        x:Class="App9.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App9"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">

        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <StackPanel Margin="20,20,20,20">
                <ComboBox x:Name="Combo"></ComboBox>
                <TextBlock Text="{Binding ElementName=Combo,Path=MaxDropDownHeight}"></TextBlock>
            </StackPanel>
        </Grid>
    </Page>

    WPF Xaml Code:

    <Window x:Class="WpfApplication4.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:WpfApplication4"
            mc:Ignorable="d"
            Title="MainWindow" Height="350" Width="525">
        <Grid>
            <StackPanel Margin="20,20,20,20">
                <ComboBox x:Name="Combo"/>
                <TextBlock Text="{Binding ElementName=Combo,Path=MaxDropDownHeight}" />
            </StackPanel>
        </Grid>
    </Window>

    Tuesday, August 2, 2016 4:52 AM

Answers

  • Hi Vijay Sathiyajaya,

    As far as I know, UWP and WPF are different template of visual studio, although they have the same Xaml, but the different template would render different UI. You could use style to change them.

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 3, 2016 3:00 AM
    Moderator