خرید بک لینک

Vote count: 0

I am working on a UWP app that has data bound in a ListView. I have been trying to find a way to collapse (hide) a control when there is no data. For example, i made a simple version of what i am doing:

<ListView Name="lvwMaster" ItemsSource="{x:Bind CollectionOfPeople}">
                <ListView.ItemTemplate>
                    <DataTemplate x:DataType="data:Person">
                        <StackPanel Name="pnlOnePerson" Margin="10">
                            <TextBlock Name="lblFirstName" Text="{x:Bind FirstName}" />
                            <TextBlock Name="lblMiddleName" Text="{x:Bind MiddleName}" Height="Auto" />
                            <TextBlock Name="lblLastName" Text="{x:Bind LastName}" />
                            <TextBlock Name="lblBirthDate" Text="{x:Bind BirthDate}" />
                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

Since not everyone has a middle name, i want the middle name field to be hidden when it is empty.

example of what it looks like when run

Any suggestions on how i might be able to hide the middle name field when the person doesn't have a middle name?

asked 23 secs ago

برچسب: how to collapse columns in excel,how to collapse a graco stroller,how to collapse cells in excel,how to collapse a razor scooter,how to collapse rows in google sheets,how to collapse a wheelchair,how to collapse a baby trend stroller,how to collapse a britax stroller,how to collapse rows in excel 2013,how to collapse bob revolution stroller, نویسنده: استخدام کار تاريخ: سه شنبه 19 مرداد 1395 ساعت: 10:08

صفحه بندی