Search Results

Search found 6871 results on 275 pages for 'wpf xaml'.

Page 15/275 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How different is WPF from ASP.NET [closed]

    - by Tom
    I have been quickly moved over to a different project at work because the project needs more help. I was chosen because they are confident in my abilities and they thought I would be best fit for the next couple weeks to help finish the application out. I am a little nervous. I do tend to pick things up quickly. I was moved to a different project at the beginning of this year and now I know it like the back of my hand. Previously I was on another project. Both of these projects were an ASP.NET web application, which I believe is considered a winforms web application? The project I am moving to is a desktop WPF application. I have read that many people enjoy developing their applications with WPF. I just have never dealt/worked with WPF before. I like to consider myself pretty good at ASP.NET/C# and I do a solid job. We deal with a lot of data processing from the database and report generation. So I do get to experience C# more so than some web applications where the C# end of it is mostly just event driven and simple instructions. How different are the two? Will it be completely foreign to me? Or is it just a different way of looking at a problem and I can familiarize myself quickly? Thanks for the input.

    Read the article

  • How can I unattach an element from another element in the XAML tree?

    - by Edward Tanguay
    In my Silverlight application, I load all the images I need at application start and store them in a dictionary. Then as I need them I pick them out of the dictionary and attach them in XAML trees etc. However, I have the problem that if I attach an Image object to a Grid, then want to use that image again, it tells me: The image element is already a child of another element. How can I run through my dictionary and "detach all images from parent XAML elements"?

    Read the article

  • How do I set a ViewModel on a window in XAML using DataContext property?

    - by Nicholas
    The question pretty much says it all. I have a window, and have tried to set the DataContext using the full namespace to the ViewModel, but I seem to be doing something wrong. <Window x:Class="BuildAssistantUI.BuildAssistantWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="BuildAssistantUI.ViewModels.MainViewModel">

    Read the article

  • Can't get the new 2009 XAML primitives working, why?

    - by Will
    What I'd like to use: 2009 XAML primitives How it would be nice to use them: <sapv:ExpressionTextBox xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ExpressionType="x:String" /> What actually happens: "Type reference cannot find the public type named String" The examples I see don't have updated namespaces. I tried 2009 and 2010, but to no avail. This is in VS 2010 RTM. What am I doing wrong?

    Read the article

  • WPF - Setting usercontrol width using triggers and mouseenter event

    - by BigBadJock
    I have a wrap panel full of usercontrols. When I hover the mouse over a usercontrol I want it to expand to show more details. Some stripped down sample code: <UserControl x:Class="WPFTestBed.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300"> <UserControl.Resources> </UserControl.Resources> <UserControl.Triggers> <EventTrigger RoutedEvent="Mouse.MouseEnter"> <EventTrigger.Actions> <Setter TargetName="WPFTestBed.UserControl1" Property="Control.Width" Value="200"/> </EventTrigger.Actions> </EventTrigger> </UserControl.Triggers> <Grid Height="95" Width="123"> <Button Height="23" HorizontalAlignment="Left" Margin="17,30,0,0" Name="button1" VerticalAlignment="Top" Width="75">Button</Button> </Grid> </UserControl> I would appreciate it if someone could point out where I'm going wrong, and set me down the correct path. Ideally, I want the usercontrol to delay for x seconds when there is a mouseover, before expanding and showing the extra details.

    Read the article

  • Import and render the contents of a XAML file inline in another XAML file?

    - by spoon16
    I have a XAML file that I exported from Expression Design. I would like to render that XAML content inline in one of my user controls. Can I reference the external XAML file that I want to include as a Resource on the UserControl I want to render it in? Or is there some other markup that I can use to identify the XAML object in my project that I want rendered in the current location? I am using Silverlight 4.

    Read the article

  • Access to bound data in IMultiValueConverter.ConvertBack() in C#/WPF

    - by absence
    I have a problem with a multibinding: <Canvas> <local:SPoint x:Name="sp" Width="10" Height="10"> <Canvas.Left><!-- irrelevant binding here --></Canvas.Left> <Canvas.Top> <MultiBinding Converter="{StaticResource myConverter}" Mode="TwoWay"> <Binding ElementName="cp1" Path="(Canvas.Top)"/> <Binding ElementName="cp1" Path="Height"/> <Binding ElementName="cp2" Path="(Canvas.Top)"/> <Binding ElementName="cp2" Path="Height"/> <Binding ElementName="sp" Path="Height"/> <Binding ElementName="sp" Path="Slope" Mode="TwoWay"/> </MultiBinding> </Canvas.Top> </local:SPoint> <local:CPoint x:Name="cp1" Width="10" Height="10" Canvas.Left="20" Canvas.Top="150"/> <local:CPoint x:Name="cp2" Width="10" Height="10" Canvas.Left="100" Canvas.Top="20"/> </Canvas> In order to calculate the Canvas.Top value, myConverter needs all the bound values. This works great in Convert(). Going the other way, myConverter should ideally calculate the Slope value (Binding.DoNothing for the rest), but it needs the other values in addition to the Canvas.Top one passed to ConvertBack(). What is the right way to solve this? I have tried making the binding OneWay and create an additional multibinding for local:SPoint.Slope, but that causes infinite recursion and stack overflow. I was thinking the ConverterParameter could be used, but it seems like it's not possible to bind to it.

    Read the article

  • Creating a semi-transparent blurred background WPF

    - by Dave Colwell
    Hi guys, I have a border, i want the background of this border to be partially transparent (opacity 0.8) but i do not want the image behind it to be well defined. The effect i am after is similar to the Windows Vista window border effect, where you can see that something is behind it but you cant tell what it is. A few clarifications: I am working on Windows XP, so i cant use Vista Glass I need this solution to be portable across any windows platform Any help would be appreciated :)

    Read the article

  • WPF ComboBox text inside ListBox

    - by geosteve
    I've got a list of ComboBoxes inside a listbox, like so: <ListBox ItemsSource="{Binding Values}"> <ListBox.ItemTemplate> <DataTemplate> <ComboBox ItemsSource="{...}" IsTextSearchEnabled="True" IsEditable="True"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> The Values for my listbox ItemsSouce is defined in my ViewModel as public ObservableCollection<string> Values { get; set; } How can I get the Text for each one of the ComboBoxes to show the Value for that particular ListBox item? (i.e. if values is {"a", "b", "c"} I want a list of 3 comboboxes showing "a", "b" and "c")

    Read the article

  • WPF Expander Button Styled so it is inside Expander Header

    - by Burt
    I am using the expander control and have styled the header as shown in the picture below. The problem I have is that I want the expander button to be contained within the header so that the line for the end of the header template aligns with the Expander content i.e. I ultimatly want to end up with something similar to the image below. Thanks in advance.

    Read the article

  • Is it possible to seletively color a wrapping TextBlock in Silverlight/WPF

    - by joemoe
    For instance, if I have a TextBlock: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." I want the first 10% of this TextBlock, such that the font color should be red, and the rest should be green. This perhaps means it would color the "Lorem ipsum dolor sit amet, consectetur adipisici", and part of the "n". Basically pixel-wise font coloring instead of character-wise. Another important behavior is that the percentage respects the wrapping, in that if 50% of the TextBlock contents is colored, it should mean 50% of the text in reading order is colored, and not the first half of the block. For example, this is a similar question (with correct answers), but regarding Label/TextBlocks with no wrapping: http://stackoverflow.com/questions/2394421/is-it-possible-to-seletively-color-a-label-in-silverlight

    Read the article

  • WPF: Animation Only Runs Once

    - by Phil Sandler
    Very basic (I think) animation question. My animation only runs the first time "MyProp" gets set to false. If it gets set a second time, the animation doesn't run. I know my data trigger is getting hit, as the sound DOES play. The effect I want is for the animation to run, then reset the target property back to what it was before the animation occurred (thus the FillBehavior=Stop). Do I need to reset the animation after it plays? <DataTrigger Binding="{Binding MyProp}" Value="False"> <DataTrigger.EnterActions> <SoundPlayerAction Source="/Resources/Sounds/Ding.wav"/> <BeginStoryboard> <Storyboard BeginTime="00:00:00" Duration="0:0:2" Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)"> <ColorAnimation FillBehavior="Stop" From="Black" To="Red" Duration="0:0:0.5" AutoReverse="True"/> </Storyboard> </BeginStoryboard> </DataTrigger.EnterActions> </DataTrigger>

    Read the article

  • WPF - Byte Array to Hex View (similar to Notepad++ HEX-Editor plugin)

    - by tenfour
    I am using an ItemsControl to display a List<byte> in hex. The ItemsPanelTemplate is a UniformGrid with a fixed number of columns: <ItemsControl HorizontalAlignment="Left" VerticalAlignment="Top" ItemsSource="{Binding}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="16"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding StringFormat='\{0:X2\}'}" Margin="5,5,5,0"/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> I'd like to prefix each row with an 'Address' column, just like you'd see with the Notepad++ 'HEX-Editor' plugin. That is, since I have 16 columns, each row should be prefixed something like this: 0000 [00 01 02 .... 0F] 0010 [10 11 12 .... 1F] 0020 [20 21 22 .... 2F] ... Any suggestions?

    Read the article

  • [WPF C#]Get UserControl or VisualTree in DataValidation of TextBlock

    - by dalind
    Hy, I have a validator set on the text property of a textblock. For a correct validation I would need the parent usercontrol of the textblock, but the only things I have in the validator are the value object (a string) and the culture (doesn't help either). Does anyone know a way to get certain usercontrols in a class/a method where I have no access to any kind of visual or control of my application. The problem could be solve if I could give the validator the usercontrol or the textblock as parameters, but I didn't find a way to do so.. Thank you very much for your answers. Greets

    Read the article

  • WPF Control Templating: Keeping Windows look and feel

    - by Tyler
    I'm working on a control template for an inherited TextBox class. I'd like to use this template to add additional controls with the ScrollViewer. I can achieve that goal just fine, what I can't do recreate the border in such away that it matches the Windows look and feel. I have Windows Classic as my theme on XP. Textboxes are typically shown with the standard inset border style. With the XP Fischer Price theme, borders of textbox are a flat style and light blue. Is there any way of specifying something like this in the template? Ideally it would use the theme default (grey inset for Classic, flat and light blue for fischer price theme).

    Read the article

  • WPF scrollviewer

    - by Bert
    Is there a posibility to scroll to a specific place in a ScrollViewer from your code behind? So something like the Slider element you can change the value property...

    Read the article

  • WPF Custom ListBox as Buttons Click not firing

    - by Ryan
    I am attempting to have a ListBox of TextBoxes with click events. I have read that one way to achieve this was to have a list of Buttons and call ButtonBase.Click="" on the ListBox. This was not working. Any advice as to how I would hook up a click event to the listbox items? Thanks <Window.Resources> <ControlTemplate x:Key="MouseOverFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF013B73" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF014A8F" Offset="0.5"/> <GradientStop Color="#FF003363" Offset="1"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="MouseOverFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource MouseOverFocusTemplate}"/> </Style> <ControlTemplate x:Key="LostFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="LostFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource LostFocusTemplate}"/> </Style> <ControlTemplate x:Key="GotFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FFE38E27" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF002F5C" Offset="0.5"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="GotFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource GotFocusTemplate}"/> </Style> <Style TargetType="{x:Type Button}" x:Key="listButton"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border BorderBrush="Black" BorderThickness="1" Margin="-2,0,0,-1"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </Grid.RenderTransform> <!--<ScrollViewer x:Name="PART_ContentHost" />--> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" Style="{StaticResource LostFocusStyle}" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" Name="bar" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="bar" Property="Style" Value="{StaticResource MouseOverFocusStyle}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <DataTemplate x:Key="CustomListData" DataType="{x:Type ListBoxItem}"> <Button Style="{StaticResource listButton}" /> </DataTemplate> </Window.Resources> <Window.DataContext> <ObjectDataProvider ObjectType="{x:Type local:ImageLoader}" MethodName="LoadImages" /> </Window.DataContext> <ListBox ItemsSource="{Binding}" Width="320" Background="#FF021422" BorderBrush="#FF1C4B79"> <ListBox.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Transparent</SolidColorBrush> <Style TargetType="{x:Type ListBox}"> <Setter Property="ItemTemplate" Value="{StaticResource CustomListData }" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> </Style> </ListBox.Resources> </ListBox>

    Read the article

  • WPF Trigger / Style overrides another

    - by ozczecho
    I have a listview defined as such <ListView Width="auto" SelectionMode="Single" ItemContainerStyle="{StaticResource baseListViewStyle}" .... Then in "baseListViewStyle" I have defined some base styles to apply to my list views, including a Style trigger: <Style x:Key="baseListViewStyle" TargetType="ListViewItem"> <Setter Property="Height" Value="20" /> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Red" /> </Trigger> </Style.Triggers> </Style> The trigger here highlights the row when mouse is over it. Nice. I also have a Data Trigger on the listviewitem: <Style.Triggers> <DataTrigger Binding="{Binding IsTestTrue}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource SomeFunkyAnimation}" /> </DataTrigger.EnterActions> </DataTrigger> If test is true then a nice little fade animation is played out. This all works except when I move my mouse over the row where "test is true" the animation stops and the mouse over style is displayed. Any ideas how I can override that style in my DataTrigger? TIA

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >