Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6168717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:44:11+00:00 2026-05-23T22:44:11+00:00

<System_Windows_Controls:TabItem Name=home Style={StaticResource TabItemStyle1} Margin=0,-37,3,0 RenderTransformOrigin=0.5,0.5 HorizontalAlignment=Stretch MouseEnter=mouse_ener Loaded=Button_Click> <ListBox Height=572 HorizontalAlignment=Stretch Margin=8,6,0,0 Name=listBox1

  • 0
   <System_Windows_Controls:TabItem  Name="home" Style="{StaticResource TabItemStyle1}"  Margin="0,-37,3,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" MouseEnter="mouse_ener" Loaded="Button_Click">
            <ListBox Height="572" HorizontalAlignment="Stretch" Margin="8,6,0,0" Name="listBox1" VerticalAlignment="Stretch"   Background="#00537393" Width="445">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Border  BorderBrush="Black" CornerRadius="8" BorderThickness="1" HorizontalAlignment="Stretch" Name="border">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                    <GradientStop Color="#FFB1B7CB" Offset="0" />
                                    <GradientStop Color="#FFC1C8D4" Offset="1" />
                                </LinearGradientBrush>
                            </Border.Background>
                            <Grid Height="106"  HorizontalAlignment="Stretch" Name="grid1" VerticalAlignment="Stretch">

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0*" />
                                    <RowDefinition Height="100*" />
                                </Grid.RowDefinitions>
                                <Image Height="68" HorizontalAlignment="Left" Margin="13,12,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="92" Grid.Row="1" Source="{Binding ImageSource}" />
                                <TextBlock Foreground="Black" Height="68" HorizontalAlignment="Left" Margin="111,12,0,0" Name="textBlock1" Text="{Binding Title}" VerticalAlignment="Top" Width="280" TextWrapping="Wrap" Grid.Row="1" />
                                <Image Grid.Row="1" Height="75" HorizontalAlignment="Left" Margin="380,12,0,0" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="73"  Source="/WindowsPhoneApplication7;component/Images/u50.png" />
                                <TextBlock  Foreground="Black" Grid.Row="1" Height="29" HorizontalAlignment="Left" Margin="111,69,0,0" Name="textBlock2" Text="{Binding date}" VerticalAlignment="Top" Width="168" />
                            </Grid>

                        </Border>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <System_Windows_Controls:TabItem.HeaderTemplate>
                <DataTemplate >
                    <StackPanel>
                        <Image Height="32" Width="32" Source="Images/u28.png"></Image>
                        <TextBlock Text=" Home "></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </System_Windows_Controls:TabItem.HeaderTemplate>
        </System_Windows_Controls:TabItem>


     basically i want to change  textblock hight property  as per orientation landscape and portrait.....
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:44:12+00:00Added an answer on May 23, 2026 at 10:44 pm

    Define your DataTemplate within your UserControl resources, and name your ListBox:

    <UserControl>
      <UserControl.Resources>
        <DataTemplate x:Key="myTemplate">
           <!-- new template goes here -->
        </DataTemplate>
      </UserControl.Resources>
    
      <ListBox x:Name="MyListBox"/>
    <UserControl>
    

    Now simply set your ItemTemplate in code-behind when you want to dynamically change it:

    MyListBox.ItemTemplate = (DataTemplate)this.Resources["myTemplate"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following code in my WPF app, for a groupbox: <GroupBox Style={StaticResource
I have a TabControl with two TabItem s and a ListBox which is common
xaml <controls:TabControl x:Name=tabControlRoom Grid.Row=1 Grid.Column=1 d:LayoutOverrides=Width, Height ItemsSource={Binding} > <controls:TabControl.ItemTemplate> <DataTemplate> <controls:TabItem Header={Binding name}>
When I create a new TabItem I create a new CheckBox at the same
I have a TreeView control from System.Windows.Controls on MainPage. <controls:TreeView x:Name=Tree SelectedItemChanged=Tree_SelectedItemChanged /> MainPage
Is there a control like System.Windows.Controls.GroupBox that can hide its contents and show only
How can I set the System.Windows.Controls.DatePicker control as used within a Silverlight project to
Microsoft has a handy reference of the various controls in the System.Windows.Controls namespace and
using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media;
I am developing a custom control derived from System.Windows.Controls.ContentControl. In the controls default template

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.