Search Results

Search found 8559 results on 343 pages for 'silverlight navigation'.

Page 62/343 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • How to define a DataTemplate in code?

    - by Asim Sajjad
    How can I create dataTemplate in code (using C#) and then add control to that DataTemplate ? <data:DataGrid.RowDetailsTemplate> <DataTemplate> <Border> <Border Margin="10" Padding="10" BorderBrush="SteelBlue" BorderThickness="3" CornerRadius="5"> <TextBlock Text="{Binding Description}" TextWrapping="Wrap" FontSize="10"> </TextBlock> </Border> </Border> </DataTemplate> </data:DataGrid.RowDetailsTemplate> I am using Sivlerlight.

    Read the article

  • expand an collapse button in datagrid

    - by prince23
    hi, <sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" IsReadOnly="True" Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged" RowDetailsVisibilityMode="VisibleWhenSelected"> <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn CanUserReorder="False"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button x:Name="ViewButton" Click="ToggleRowDetailsVisibility" Cursor="Hand" Content="View Details" /> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTextColumn Header="Countryname" Width="100" Binding="{Binding Region Name}" CanUserReorder="False"/> <sdk:DataGridTextColumn Header="Populution" Width="80" Binding="{Binding Number Of People}" CanUserReorder="False"/> </sdk:DataGrid.Columns> <sdk:DataGrid.RowDetailsTemplate> <DataTemplate> <sdk:DataGrid x:Name="dgrdRowDetail" Width="400" AutoGenerateColumns="False" HorizontalAlignment="Center" IsReadOnly="True" Grid.Row="1"> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Header="county" Binding="{Binding CompanyName}"/> <sdk:DataGridTextColumn Header="Number Of People" Binding="{Binding CompanyID}"/> </sdk:DataGrid.Columns> </sdk:DataGrid> </DataTemplate> </sdk:DataGrid.RowDetailsTemplate> </sdk:DataGrid> how to make an button in datagrid expand an collapse where there will be 2 image buttons once user clicks the button the rows under it will expand where there should be an one image button with (- symbol) again user clicks the same row the rows which were expanded should collapse.(+ image button) here i have done the function for doing the expand and collapse is completed. now only i need add an image which will change once the user clicks the row either ( we can do it by javascript or in code behind ?) how can i change the image button like that can any one tell me how i should i ahead or any code that can help me to solve the issue thanks in adance prince

    Read the article

  • How to get the child elementsvalue , when the parent element contains different number of child Elem

    - by Subhen
    Hi, I have the following XML Structure: <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"> <item id="1268" parentID="20" restricted="1"> <upnp:class>object.item.audioItem.musicTrack</upnp:class> <dc:title>Hey</dc:title> <dc:date>2010-03-17T12:12:26</dc:date> <upnp:albumArtURI dlna:profileID="PNG_TN" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0">URL/albumart/22.png</upnp:albumArtURI> <upnp:icon>URL/albumart/22.png</upnp:icon> <dc:creator>land</dc:creator> <upnp:artist>sland</upnp:artist> <upnp:album>Change</upnp:album> <upnp:genre>Rock</upnp:genre> <res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" size="9527987" duration="0:03:58">URL/1268.mp3</res> <res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_CI=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000" colorDepth="24" resolution="160x160">URL/albumart/22.png</res> </item> <item id="1269" parentID="20" restricted="1"> <upnp:class>object.item.audioItem.musicTrack</upnp:class> <dc:title>Indian </dc:title> <dc:date>2010-03-17T12:06:32</dc:date> <upnp:albumArtURI dlna:profileID="PNG_TN" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0">URL/albumart/13.png</upnp:albumArtURI> <upnp:icon>URL/albumart/13.png</upnp:icon> <dc:creator>MC</dc:creator> <upnp:artist>MC</upnp:artist> <upnp:album>manimal</upnp:album> <upnp:genre>Rap</upnp:genre> <res protocolInfo="http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" size="8166707" duration="0:03:24">URL/1269.mp3</res> <res protocolInfo="http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_CI=01;DLNA.ORG_FLAGS=00f00000000000000000000000000000" colorDepth="24" resolution="160x160">URL/albumart/13.png</res> </item> <item id="1277" parentID="20" restricted="1"> <upnp:class>object.item.videoItem.movie</upnp:class> <dc:title>IronMan_TeaserTrailer-full_NEW.mpg</dc:title> <dc:date>2010-03-17T12:50:24</dc:date> <upnp:genre>Unknown</upnp:genre> <res protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=(NULL);DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" size="98926592" resolution="1920x1080" duration="0:02:30">URL/1277.mpg</res> </item> </DIDL-Lite> Here in the last Elemnt Item , there are few missing elements like icon,albumArtURi ..etc. Now whhile Ity to access the Values by following LINQ to XML query, var vAudioData = from xAudioinfo in xResponse.Descendants(ns + "DIDL-Lite").Elements(ns + "item").Where(x=>!x.Elements(upnp+"album").l orderby ((string)xAudioinfo.Element(upnp + "artist")).Trim() select new RMSMedia { strAudioTitle = ((string)xAudioinfo.Element(dc + "title")).Trim(),//((string)xAudioinfo.Attribute("audioAlbumcoverImage")).Trim()=="" ? ((string)xAudioinfo.Element("Song")).Trim():"" }; It show object reference is not set to reference of object. I do undersrand this is because of missing elements, is there any way I can pre-check if the elements exist , or check the number of elemnts inside item or any other way. Any help is deeply appreciated. Thanks, Subhen

    Read the article

  • TreeView inside AutoCompleteBox's popup

    - by Satumba
    Hi, Inspired by this post, I'm trying to use a TreeView inside the AutoCompleteBox's popup in order to show hierarchical data. Here's what i did: I Made my own TreeView that implements ISelectionAdapter (not sure it's perfect) Edit AutoCompleteBox template and change the selector to my treeview Try Bind my ViewModel to it Unfortunately this is not working. i checked my new TreeView with the same binding to the same object and it works prefectly when it's outside of a AutoCompleteBox template. Any idea? any special way to implement ISelectionAdapter for treeview? did i missed something? couldn't find any example for it on the web... Thanks.

    Read the article

  • Error Cannot create an Instance of "ObjectName" in Designer when using <UserControl.Resources>

    - by Mike Bynum
    Hi All, I'm tryihg to bind a combobox item source to a static resource. I'm oversimplfying my example so that it's easy to understand what i'm doing. So I have created a class public class A : ObservableCollection<string> { public A() { IKBDomainContext Context = new IKBDomainContext(); Context.Load(Context.GetIBOptionsQuery("2C6C1Q"), p => { foreach (var item in SkinContext.IKBOptions) { this.Add(item); } }, null); } } So the class has a constructor that populates itself using a domaincontext that gets data from a persisted database. I'm only doing reads on this list so dont have to worry about persisting back. in xaml i add a reference to the namespace of this class then I add it as a usercontrol.resources to the page control. <UserControl.Resources> <This:A x:Key="A"/> </UserControl.Resources> and then i use it this staticresource to bind it to my combobox items source.in reality i have to use a datatemplate to display this object properly but i wont add that here. <Combobox ItemsSource="{StaticResource A}"/> Now when I'm in the designer I get the error: Cannot Create an Instance of "A". If i compile and run the code, it runs just fine. This seems to only affect the editing of the xaml page. What am I doing wrong?

    Read the article

  • How to set the PlayList Index for Mediaplayer(ExpressionMediaPlayer:Mediaplayer)

    - by Subhen
    Hi, I have a Mediaplayer control on my XAML page like below: <CustomMediaElement:CustomMediaPlayer x:Name="custMediaElement" VerticalAlignment="Center" Width="600" Height="300" Visibility="Collapsed" /> Now I am ble to set the playList by using setPlayList() method like below: private void setPlayList() { IEnumerable eLevelData = null; eLevelData = pMainPage.GetDataFromDictonary(pMainPage.strChildFolderID); foreach (RMSMedia folderItems in eLevelData) { string strmediaURL = folderItems.strMediaFileName; if (hasExtension(strmediaURL) == "wmv" || hasExtension(strmediaURL) == "mp4" || hasExtension(strmediaURL) == "mp3" || hasExtension(strmediaURL) == "mpg") { PlaylistItem playListItem = new PlaylistItem(); string thumbSource = folderItems.strAlbumcoverImage; playListItem.MediaSource = new Uri(strmediaURL, UriKind.RelativeOrAbsolute); playListItem.Title = folderItems.strAlbumName; if (!string.IsNullOrEmpty(thumbSource)) playListItem.ThumbSource = new Uri(thumbSource, UriKind.RelativeOrAbsolute); playList.Items.Add(playListItem); } } custMediaElement.Playlist = playList; } Now , I want to change the PlayListIndex of Mediaplayer, when user clicks on a listBox Item , which contains the title of all the songs. When the user clicks on the third song title from the songs Title List the mediaPlayer should play the third song , or if the user cliks on 7th song title, the mediaPlayer should play the 7th song. My motto is to pick up the Selected index from the listbox and assign it to the PlayList Index of mediaPlayer. While I add a watch to playList I am able to see , playList , Items , [0] PlaylistIndex 1 playList , Items , [1] PlaylistIndex 2 But While I am trying to set it from the code , the same property PlaylistIndex seems unavailable. Please help. Thanks, Subhen

    Read the article

  • How can i navigate one xaml page to another?

    - by programmerist
    i have 2 page i need to navigate mainpage.xaml to login.page xaml but it throws me Object reference not set to an instance of an object. in Root.Children.Clear();.... i added this codes in App.xaml: private void Application_Startup(object sender, StartupEventArgs e) { Grid myGrid = new Grid(); myGrid.Children.Add(new MainPage()); this.RootVisual = myGrid; } and than i adde some codes on main.xaml to navigate to LoginUI.xaml namespace Gen.CallCenter.UI { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); Grid Root = ((Grid)(this.Parent)); Root.Children.Clear(); Root.Children.Add(new LoginUI()); } } } How can i navigate main.xaml to LoginUI.xaml ?

    Read the article

  • How add a ItemsPanel dynamically to listbox.

    - by Subhen
    Hi, I have a list Box which contains few Images in the itemsTemplate , like below: <ListBox.ItemTemplate> <DataTemplate> <StackPanel x:Name="stackPanelItems" Orientation="Horizontal"> <Image Source="{Binding strAlbumcoverImage}" Height="40" Width="40"/> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> Now onClick of a button I want to change the view and for that I want to add the wrap panel to the ListBox ItemsPanelas following: <ListBox.ItemsPanel> <ItemsPanelTemplate> <controlsToolkit:WrapPanel></controlsToolkit:WrapPanel> </ItemsPanelTemplate> </ListBox.ItemsPanel> Do I need to define the ItemsPanel Style in App.XAML and then assign it. Not quite sure about it. Thanks, Subhen

    Read the article

  • How to hide the border around child window

    - by Subhen
    Hi, I have a child Window , and I am displaying it from the code behind as below: ChildPhotoViewer PhotoViewer = new ChildPhotoViewer(); PhotoViewer.DataContext = selectedPhoto; PhotoViewer.Title = selectedPhoto.strTitle.ToString(); PhotoViewer.Show(); But While Displaying the child window I am getting the Close Button and a Border thickness arround the Window. I am able to hide the Close Button but is there a way to hide the thickness(Border) across the child window. Thanks, Subhen

    Read the article

  • Adding image to RichTextBox programatically does not show in Xaml property

    - by rotary_engine
    Trying to add an image to a RichTextBox progamatically from a Stream. The image displays in the text box, however when reading the Xaml property there is no markup for the image. private void richTextBox3_Drop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { FileInfo[] files = (FileInfo[])e.Data.GetData(DataFormats.FileDrop); using (Stream s = files[0].OpenRead()) { InlineUIContainer container = new InlineUIContainer(); BitmapImage bmp = new BitmapImage(); bmp.SetSource(s); Image img = new Image(); img.SetValue(Image.SourceProperty, bmp); container.Child = img; richTextBox3.Selection.Insert(container); } } } private void Button_Click_1(object sender, RoutedEventArgs e) { // this doesn't have the markup from the inserted image System.Windows.MessageBox.Show(richTextBox3.Xaml); } What is the correct way to insert an image into the RichTextBox at runtime so that it can be persisted to a data store? In the Xaml property.

    Read the article

  • XAML ContextMenu gets bound to wrong row in a DataGrid

    - by Simon_Weaver
    I have a XAML based ContextMenu bound to the rows in a datagrid. It works just fine - until the grid is scrolled! This is the context menu for one of the controls in the visual tree or a DataGrid row. <data:DataGridTemplateColumn Header="Customer Details" Width="*"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid Background="Transparent"> <!-- allows click in entire cell --> <controlsInputToolkit:ContextMenuService.ContextMenu> <controlsInputToolkit:ContextMenu> <controlsInputToolkit:MenuItem Header="{Binding CompletedOrderId,StringFormat='Create Reminder for order #\{0\}'}" CommandParameter="{Binding}"> <controlsInputToolkit:MenuItem.Command> <command:CreateReminderCommand/> </controlsInputToolkit:MenuItem.Command> <controlsInputToolkit:MenuItem.Icon> <Viewbox> <Image Width="19" Height="18" Source="../images/reminders.png" VerticalAlignment="Center"/> </Viewbox> </controlsInputToolkit:MenuItem.Icon> </controlsInputToolkit:MenuItem> <controlsInputToolkit:ContextMenu> <controlsInputToolkit:ContextMenuService.ContextMenu> ...... The ICommand is CreateReminderCommand and the CommandParameter is bound to the data item for the row itself. This works just fine - I can right click on a row and it will show me the correct text in the menu item 'Create Reminder for order 12345'. Then I scroll the datagrid down a page. If I keep right clicking on items then suddenly I'll see the wrong order number for a row. I think what must be happening is this : The DataGrid is reusing instances of MenuItem that it has previously created. How can I force a refresh of the ContextMenu when it is displayed for an item that changes? There's no 'Update method on the ContextMenu or ContextMenuService.

    Read the article

  • expand/collpase datagrid

    - by prince23
    hi, i have an nested datagrid . i able to bind the values with no issues once i clik teh row i able to show nested grid. now i need to add an image button( like an "+ " Symbol ) at the left corner. once i press this button the grid shows the further records under it. that time i need to repalce the image button with ("--" symbol). i have these two images done. but how to do this is really a big issue now for me.can any one help me out.struck on this issue from past 3 days. plz plz provide an solution on this. i would be really thank full for you guys . am new to silver light this is my code. <sdk:DataGrid MinHeight="100" x:Name="dgCounty" AutoGenerateColumns="False" VerticalAlignment="Top" Grid.Row="1" IsReadOnly="True" Margin="5,5,5,0" RowDetailsVisibilityChanged="dgCounty_RowDetailsVisibilityChanged" RowDetailsVisibilityMode="VisibleWhenSelected"> <sdk:DataGrid.Columns> <sdk:DataGridTemplateColumn CanUserReorder="False"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Content="+" Click="Button_Click"></Button> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> <sdk:DataGridTextColumn Header="ID" Width="100" Binding="{Binding EmployeeID}" CanUserReorder="False"/> <sdk:DataGridTextColumn Header="FirstName" Width="80" Binding="{Binding EmployeeFName}" CanUserReorder="False"/> <sdk:DataGridTextColumn Header="LastName" Width="80" Binding="{Binding EmployeeLName}" CanUserReorder="False"/> <sdk:DataGridTextColumn Header="MailID" Width="80" Binding="{Binding EmployeeMailID}" CanUserReorder="False"/> </sdk:DataGrid.Columns> <sdk:DataGrid.RowDetailsTemplate> <DataTemplate> <sdk:DataGrid x:Name="dgrdRowDetail" Width="400" AutoGenerateColumns="False" HorizontalAlignment="Center" IsReadOnly="True" > <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Header="CompanyName" Binding="{Binding CompanyName}"/> <sdk:DataGridTextColumn Header="CompanyID" Binding="{Binding CompanyID}"/> <sdk:DataGridTemplateColumn Header="Score"> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate > <StackPanel Loaded ="StackPanel_Loaded" Orientation="Horizontal" Background="Transparent"> <TextBlock Text="{Binding Score}" TextWrapping="NoWrap" HorizontalAlignment="Center" Foreground="Blue"></TextBlock> <!--<Image Source ="../Images/image1.JPG" Width="20" Height="20" Stretch ="Fill"/>--> <Image x:Name="imgScore" Source ="{Binding Score}" Width="20" Height="20" Stretch ="Fill"/> <sdk:Label Content="Score" /> </StackPanel> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn> </sdk:DataGrid.Columns> </sdk:DataGrid> private void Button_Click(object sender, RoutedEventArgs e) { //how to handle this issue. } if possiable plz provide the code that can help me out.

    Read the article

  • Databinding race condition

    - by Stephen Price
    I have a login form (using ChildWindow) and have implemented a Keyup event handler on the passwordbox. If the key is enter then it sets the ChildWindow ResultDialog to true. What seems to be happening is the databinding on the Passwordbox is not happening before the childwindow is closed so the Password property on my Login control is null. I've tried using KeyUp and Keydown, as well as using a buttonAutoPeer to invoke a click on the Ok button. I've also tried setting the focus to the OKbutton before setting the DialogResult (which closes the window). private void PasswordBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (UsernameBox.Text != userPrompt && !string.IsNullOrEmpty(PasswordBox.Password.Trim())) { this.DialogResult = true; } else { UsernameBox.Focus(); } } }

    Read the article

  • How to make the ChildWindow Fulscreen?

    - by Subhen
    Hi , I have a ChildWindow , in which I have a Video Playing in Expression MediaPlayer. When I press the FullScreen Button then the whole Application switch to FullScreen Mode , but I want only the Child Window to be Full Screen. Thanks, Subhen

    Read the article

  • MVVM - RaisePropertyChanged turning code into a mess

    - by vidalsasoon
    New to MVVM so please excuse my ignorance. I THINK i'm using it right but I find my ViewModel has too many of these: RaisePropertyChanged("SomeProperty") Every time I set a property I have to raise that damned property changed. I miss the days where I could just go: public int SomeInteger { get; private set;} These days I have to stick the "RaisePropertyChanged" in everywhere or my UI does not reflect the changes :( Am I doing it wrong or are other people getting annoyed with the excessive number of magic strings and old school property setters? Should I be using dependency properties instead? (I doubt that would help the code bloat anyway) Despite these problems I still think MVVM is the way to go so I guess that's something.

    Read the article

  • Unable to understand "A field initializer cannot reference the nonstatic field" Error?

    - by Subhen
    Hi, I am getting the error "A field initializer cannot reference the nonstatic field", While My code is as below: Object selectedItem = PageVariables.slectedItemData; MyClass selectedItems = (MyClass)selectedItem; But the same thing works if assign the value at the constructor or in a different method , like below: public partial class MusicPlayer : Page { Object selectedItem = PageVariables.slectedItemData; public MusicPlayer() { InitializeComponent(); MyClass selectedItems = (MyClass)selectedItem; } } I am just trying to understand what is the difference, Why it is looking for a static varaible declaration(in 1st case) while doesn't look for it while in a constructor or a different method!!!

    Read the article

  • How to assign Image Uri in a custom Control.

    - by Subhen
    Hi, I want to place an image inside my custom control , so my generic.xaml looks like below: <Style TargetType="local:generic"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:generic"> <Grid Background="{TemplateBinding Background}"> <Rectangle> <Rectangle.Fill> <SolidColorBrush x:Name="BackgroundBrush" Opacity="0" /> </Rectangle.Fill> </Rectangle> <TextBlock Text="{TemplateBinding Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}"/> <Image Source="{TemplateBinding Source}" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> My Codebehind is as follows: public class Generic : Control { public static DependencyProperty ImageUri = DependencyProperty.Register("Source", typeof(Uri), typeof(generic), new PropertyMetadata("")); public Uri Source { get { return (Uri)GetValue(generic.ImageUri); } set { SetValue(generic.ImageUri, value); } } public generic() { this.DefaultStyleKey = typeof(generic); } } Apllication is compiling fine but while I am trying to run it throws the following exception : $exception {System.Windows.Markup.XamlParseException: System.TypeInitializationException: The type initializer for 'testCstmCntrl.themes.generic' threw an exception. ---> System.ArgumentException: Default value type does not match type of property. Thanks, Subhen

    Read the article

  • AG_E_PARSER_PROPERTY_NOT_FOUND exception.

    - by Subhen
    Hi , Can any one plese explain why this error is happenin? I have created a usercontrol in another class and public partial class userControlImageFolder : RadioButton { public userControlImageFolder() { InitializeComponent(); } } Now in XAML it is a lot of code created by the designer like below: <UserControl x:Class="userControlFolder.userControlLocalFolder" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Height="120" Width="150"> <UserControl.Resources> <Style x:Key="rdbfolder" TargetType="RadioButton"> <Setter Property="Background" Value="#FF448DCA"/> <Setter Property="Foreground" Value="#FF000000"/> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="VerticalContentAlignment" Value="Top"/> <Setter Property="Padding" Value="4,1,0,0"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderBrush"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFA3AEB9" Offset="0"/> <GradientStop Color="#FF8399A9" Offset="0.375"/> <GradientStop Color="#FF718597" Offset="0.375"/> <GradientStop Color="#FF617584" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="RadioButton"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="MouseOver"/> <VisualState x:Name="Pressed"/> <VisualState x:Name="Disabled"/> </VisualStateGroup> <VisualStateGroup x:Name="CheckStates"> <VisualState x:Name="Checked"> <Storyboard> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path3" Storyboard.TargetProperty="(UIElement.Opacity)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path4" Storyboard.TargetProperty="(UIElement.Opacity)"> <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unchecked"/> </VisualStateGroup> <VisualStateGroup x:Name="FocusStates"> <VisualState x:Name="Focused"/> <VisualState x:Name="Unfocused"/> </VisualStateGroup> <VisualStateGroup x:Name="ValidationStates"> <VisualState x:Name="Valid"/> <VisualState x:Name="InvalidUnfocused"/> <VisualState x:Name="InvalidFocused"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid.ColumnDefinitions> <ColumnDefinition Width="125"/> </Grid.ColumnDefinitions> <Path x:Name="path1" Stroke="#FFEFCD44" Width="Auto" Data="F1M12,1.087C12,1.087 28.814,1.087 49.294,1.087 53.671,1.087 58.215,13 62.799,13 91.625,13 122,13 122,13 127.523,13 132,17.477 132,23 132,23 132,98 132,98 132,103.523 127.523,108 122,108 122,108 12,108 12,108 6.477,108 2,103.523 2,98 2,98 2,12.337 2,12.337 2,6.815 6.477,1.087 12,1.087z" HorizontalAlignment="Stretch" Margin="0,1.765,-7.564,0" VerticalAlignment="Top" Height="108.5" UseLayoutRounding="False" d:LayoutOverrides="Width"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFE5B802" Offset="0.996"/> <GradientStop Color="#FFFFF3C1" Offset="0.009"/> <GradientStop Color="#FFC1A11F" Offset="0.16"/> </LinearGradientBrush> </Path.Fill> </Path> <Path x:Name="path2" Stretch="Fill" Width="Auto" Data="M47.476928,130.65616 C47.476928,130.65616 167.10104,89.928686 175.76116,103.61726 L175.20267,155.29888 C175.20267,155.29888 46.697497,161.72468 46.697497,161.72468 46.697497,161.72468 47.476928,130.65616 47.476928,130.65616 z" HorizontalAlignment="Stretch" Margin="2.5,38.07,-6.564,0" VerticalAlignment="Top" Height="61.919" UseLayoutRounding="False"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFE5B802" Offset="1"/> <GradientStop Color="#FFECC31C"/> <GradientStop Color="#FFE7C536" Offset="0.591"/> </LinearGradientBrush> </Path.Fill> </Path> <Path x:Name="path1_Copy" Stroke="#FFEFCD44" Width="Auto" Data="F1 M120.50496,0.49999992 C126.02796,0.49999992 130.50496,4.9769999 130.50496,10.5 130.50496,10.5 130.50496,76.333333 130.50496,76.333333 130.50496,81.856333 126.02796,86.333333 120.50496,86.333333 120.50496,86.333333 10.504963,86.333333 10.504963,86.333333 4.9819634,86.333333 0.5049634,81.856333 0.5049634,76.333333 0.5049634,76.333333 0.5049634,12.040168 0.5049634,12.040168 0.33018858,5.8202529 4.7881744,0.99969011 11.184806,0.94185195 39.903021,0.68218267 120.50496,0.49999992&#xa;120.50496,0.49999992 z" HorizontalAlignment="Stretch" Margin="1.497,23.434,-7.502,0" VerticalAlignment="Top" Height="86.833" UseLayoutRounding="False"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFE5B802" Offset="0.996"/> <GradientStop Color="#FFFFFB9D" Offset="0.009"/> <GradientStop Color="#FFF1D256" Offset="0.164"/> <GradientStop Color="#FFE2BC22" Offset="0.505"/> <GradientStop Color="#FFB5780F" Offset="0.948"/> </LinearGradientBrush> </Path.Fill> </Path> <Path x:Name="path3" Stroke="#FFEFCD44" Width="133" Data="F1M12,1.087C12,1.087 28.814,1.087 49.294,1.087 53.671,1.087 58.215,13 62.799,13 91.625,13 122,13 122,13 127.523,13 132,17.477 132,23 132,23 132,98 132,98 132,103.523 127.523,108 122,108 122,108 12,108 12,108 6.477,108 2,103.523 2,98 2,98 2,12.337 2,12.337 2,6.815 6.477,1.087 12,1.087z" HorizontalAlignment="Right" Margin="0,1.719,-8,0" VerticalAlignment="Top" Height="108.5" Opacity="0" UseLayoutRounding="False"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF6A5603" Offset="1"/> <GradientStop Color="#FFF3EFDE"/> <GradientStop Color="#FFDAB20D" Offset="0.349"/> </LinearGradientBrush> </Path.Fill> </Path> <Path x:Name="path4" Width="150" Data="F1 M30,0 C30,0 140,0 140,0 145.523,0 150,4.477 150,10 150,10 130,55 130,55 130,55 124.65027,67.742768 120,65 120,65 10,65 10,65 4.477,65 0,60.523 0,55 0,55 20,10 20,10 22.247647,3.2935648 24.477,0&#xa;30,0 z" HorizontalAlignment="Right" Margin="0,43.379,-31.05,0" VerticalAlignment="Top" Height="65.387" Opacity="0" UseLayoutRounding="False"> <Path.Fill> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFE5B802" Offset="1"/> <GradientStop Color="White"/> <GradientStop Color="#FFFAD336" Offset="0.378"/> </LinearGradientBrush> </Path.Fill> </Path> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <RadioButton HorizontalAlignment="Left" Style="{StaticResource rdbfolder}" VerticalAlignment="Top" Content="RadioButton" Height="120" Width="150"/> </Grid> </UserControl> I am sorry for pasting the whole code but this is might be the only way can help us. I create a dll out of it and uses in my other projects: using userControlFolder; userControlLocalFolder btnLocalFolder = new userControlLocalFolder(); Canvas.SetTop(btnLocalFolder, 100); gridRoot.Children.Add(btnLocalFolder); So while running it I get the above exception, AG_E_PARSER_PROPERTY_NOT_FOUND, Please help. Thanks, Subhen

    Read the article

  • DataGrid giving error and getting invisible whenever some elements visibility is changed

    - by Tarun
    I have a datagrid in which i have textblocks as one column.Then in the next column i have progress bar over which there is a textblock.On loading row of datagrid,i add these three into lists of textblock and progressbar.I start the first progress bar and after 15-20 minutes next progress bar is started.The next progress bar is getting started fine and after 20 minutes it is getting invisible.The problem is that if i try to make textblock invisible,then the whole Datagrid gets invisible and stops working.After all the tasks in the Datagrid are complete i need to make DataGrid invisible and also when i try to do so,the grid becomes invisible and no other event gets fired.... e.g List txtlist=new List(); i=1; txtlist[i].Visibility=Visibility.Collapsed;

    Read the article

  • Binding position to ActualHeight

    - by Qanik
    Hi I want to bind a lists position to its own height in XAML. So its lower left corner always will be at 0.0 of the canvas. I'm using elementBinding to get the ActualHeight and a converter to invert the property. But the height sent to the converter is 0. How do I solve this or am I going at this the wrong way? <Canvas x:Name="DisplaySurface"> <ListBox x:Name="MenuList" Visibility="Visible" Canvas.Top="{Binding ElementName=MenuList, Path=ActualHeight, Converter={StaticResource LamdaConv}, ConverterParameter='val=>-val'}"> <ListBoxItem Content="item 1" /> <ListBoxItem Content="item 2" /> <ListBoxItem Content="item 3" /> <ListBoxItem Content="item 4" /> <ListBoxItem Content="item 5" /> <ListBoxItem Content="item 6" /> </ListBox> </Canvas> -Qanik

    Read the article

  • Value is out of Range Exception While setting ResourceDictionary Source to CustomControl's generic.X

    - by Subhen
    Hi, I have a custom Control which contains the generic.xaml inside the Themes folder. I have set the build action to Resource. Now from App.xaml I am setting the reference to the DLL by using : xmlns:localFolder="clr-namespace:customControl;assembly=customControl" After the reference is set I am trying to Merge the Resource dictionary in my App.xaml as follow: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="localFolder;component/Themes/generic.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> But while running my application I am getting the following XAMLParseException: Attribute localFolder;component/Themes/generic.xaml value is out of range. [Line: 16 Position: 44]

    Read the article

  • e.Row.Tag .ToString

    - by prince23
    hi, Child data grid is not showing the values in the page for the child datagrid I am binding with an list <sdk:DataGrid MinHeight="100" x:Name="contacts" Margin="51,21,88,98" RowDetailsVisibilityChanged="contacts_RowDetailsVisibilityChanged" LoadingRowDetails="contacts_LoadingRowDetails" RowDetailsVisibilityMode="VisibleWhenSelected" MouseLeftButtonUp="contacts_MouseLeftButtonUp" MouseLeftButtonDown="contacts_MouseLeftButtonDown"> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Binding="{Binding EmployeeID}" Header="ID" /> <sdk:DataGridTextColumn Binding="{Binding EmployeeFName}" Header="Fname" /> <sdk:DataGridTextColumn Binding="{Binding EmployeeLName}" Header="LName" /> <sdk:DataGridTextColumn Binding="{Binding EmployeeMailID}" Header="MailID" /> </sdk:DataGrid.Columns> <sdk:DataGrid.RowDetailsTemplate> <DataTemplate> <sdk:DataGrid x:Name="dgrdRowDetail" Width="200" AutoGenerateColumns="False" HorizontalAlignment="Center" IsReadOnly="True"> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Header="CompanyName" Binding="{Binding Company name}"/> <sdk:DataGridTextColumn Header="CompanyName" Binding="{Binding EmpID}"/> </sdk:DataGrid.Columns> </sdk:DataGrid> </DataTemplate> </sdk:DataGrid.RowDetailsTemplate> </sdk:DataGrid> I am having 2 grids "contacts" and "dgrdRowDetail" globally i have defined an variable like this:- DataGrid dgrdRowDetail; in the contacts_RowDetailsVisibilityChanged event I have this code if (e.Row.DataContext != null) { string strEmpID = ((SilverlightApplication1.DBServiceEMP.Employee)((e.DetailsElement).DataContext)).EmployeeID; dgrdRowDetail = (DataGrid)e.DetailsElement.FindName("dgrdRowDetail"); // here i am finding the child datgrid control in contacts datagrid // then in dgrdRowDetail i will be binding this grid with new values if (strEmpID != null) { int EmpID = Convert.ToInt32(strEmpID.ToString()); DBServiceEmp.GetEmployeeIDCompleted += new EventHandler<GetEmployeeIDCompletedEventArgs>(DBServiceEmp_GetEmployeeIDCompleted); DBServiceEmp.GetEmployeeIDAsync(EmpID); } } this is my method void DBServiceEmp_GetEmployeeIDCompleted(object sender, GetEmployeeIDCompletedEventArgs e) { // List<Employee> Employes = new List<Employee>(); List<Employee> rows = new List<Employee>(); for (int i = 0; i < e.Result.Count; i++) { rows.Add(e.Result[i]); } dgrdRowDetail.ItemsSource = rows; // here i am binding the child datagrid with new data source } dgrdRowDetail.ItemsSource = rows// what ever rows i am binding to dgrdRowDetail are not shown in the page if i check the rows i am able to see the value ther. but in the child grid it is not reflecting plz plz help me out i am struck thanks in advance prince

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >