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 3348080
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:29:56+00:00 2026-05-18T01:29:56+00:00

Why does this listbox crash on windows XP and not Vista or windows 7,

  • 0

Why does this listbox crash on windows XP and not Vista or windows 7,

The it builds fine without error but when iam trying to run it in xp in crashed and i get this error..
System.FormatExeption

<ListBox Name="lvMyAssignments" ScrollViewer.VerticalScrollBarVisibility="Hidden" Height="280" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemTemplate>
    <DataTemplate>
        <Button Margin="0,3,0,0" Tag="{Binding Path=Plocklista}" Background="Transparent" Click="Open_Assignment">
            <StackPanel>
                <Border BorderBrush="Black" BorderThickness="1,1,1,0">
                    <Border.Style>
                        <Style>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}}" Value="True">
                                    <Setter Property="Border.Height" Value="100"/>
                                    <Setter Property="Border.Background">
                                        <Setter.Value>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                                                <GradientStop Color="DarkGray" Offset="1"/>
                                                <GradientStop Color="#FFE8E8E8"/>
                                                <GradientStop Color="#FFBDBDBD" Offset="0.153"/>
                                                <GradientStop Color="DarkGray" Offset="0.904"/>
                                            </LinearGradientBrush>
                                        </Setter.Value>
                                    </Setter>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                            <GradientStop Color="#FFECECEC" Offset="1"/>
                            <GradientStop Color="#FFE8E8E8"/>
                            <GradientStop Color="#FFBDBDBD" Offset="0.153"/>
                            <GradientStop Color="#FFE8E8E8" Offset="0.904"/>
                        </LinearGradientBrush>
                    </Border.Background>
                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                        <Border BorderBrush="Darkgray" BorderThickness="0,0,1,0">
                            <DockPanel Width="555">
                                <ItemsControl Height="70" ItemsSource="{Binding Path=Descriptions}" Background="Transparent" BorderThickness="0" >
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock FontWeight="Bold" Text="{Binding Path=Value}"/>
                                                <TextBlock FontWeight="Bold" Margin="5,0,0,0" Text="{Binding Path=Key}"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </DockPanel>
                        </Border>
                        <StackPanel HorizontalAlignment="Center">
                            <StackPanel.Background>
                                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                    <LinearGradientBrush.RelativeTransform>
                                        <TransformGroup>
                                            <TranslateTransform X="-0.5" Y="-0.5"/>
                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                            <SkewTransform AngleX="0" AngleY="0"/>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform X="0.5" Y="0.5"/>
                                            <TranslateTransform X="0" Y="0"/>
                                        </TransformGroup>
                                    </LinearGradientBrush.RelativeTransform>
                                    <GradientStop Color="sc#1, 1, 0.158960834, 0.004391442" Offset="0"/>
                                    <GradientStop Color="sc#1, 1, 0.5, 0.5" Offset="1"/>
                                </LinearGradientBrush>
                            </StackPanel.Background>
                            <StackPanel HorizontalAlignment="Center">
                                <StackPanel.Background>
                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                        <LinearGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <TranslateTransform X="-0.5" Y="-0.5"/>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="90"/>
                                                <TranslateTransform X="0.5" Y="0.5"/>
                                                <TranslateTransform X="0" Y="0"/>
                                            </TransformGroup>
                                        </LinearGradientBrush.RelativeTransform>
                                        <GradientStop Color="sc#1, 1, 0.158960834, 0.004391442" Offset="0"/>
                                        <GradientStop Color="sc#1, 1, 0.5, 0.5" Offset="1"/>
                                    </LinearGradientBrush>
                                </StackPanel.Background>
                                <TextBlock Text="{Binding Path=Antal}" TextAlignment="Center" Width="100" FontSize="44pt" FontFamily="Calibri"/>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </Border>
            </StackPanel>
        </Button>
    </DataTemplate>
</ListBox.ItemTemplate>

  • 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-18T01:29:57+00:00Added an answer on May 18, 2026 at 1:29 am

    The only thing I see in your XAML that might be affected by OS version is Font="Calibri", since XP will have different fonts installed than Vista / Win7, and WPF has its own font handling. Maybe that is it, but probably not.

    I suggest you post a stack trace of the FormatException you get. This might give some real clues. Also try to boil down your XAML to the mimimum necessary to give the error. Then we will be more likely to see it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does this make sense? MyValue can be true or false Should it not be
Why does this attempt at creating a list of curried functions not work? def
(For this example) ListBox l is bound to CustomObjectCollection c. Does l call c's
Pretty new to C# but not new in programming in generally. I'm still trying
Why does this throw an error and how can I fix... I need to
Does this look like it should work? I'm wanting to generate directions from one
Does this smell? I have a few properties you can only set once. They
Does this code cause a memory leak: int main(){ int * a = new
Does this seem right, the dataFilePath is on disk and contains the right data,
Does this work in > iOS 5? .element { background: url(images/myImage.jpg) 50% 0 no-repeat

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.