Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
L

laprathab

@laprathab
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataGrid Bindings not working
    L laprathab

    can you post your code...

    WPF wpf question csharp wcf

  • How to partially load controls in WPF Pages
    L laprathab

    How can i partially load the controls(combo box, list box) from database, Just like the AJAX's Update panel. Thanks in advance

    WPF csharp database wpf tutorial question

  • WPF Toolkit: DataGrid disbled the cell
    L laprathab

    I am using wpf toolkit:Datagrid in my application with one Check box column and another textbox column. By default textbox column is Readonly.If Check box is checked then editing the textbox for particular row. How can achieve the above scenario?...Thanks in advance

    WPF csharp wpf question

  • Listview binding is not working with page class
    L laprathab

    Thanks very much...I tried 2nd solution that works fine...

    WPF wpf css dotnet wcf com

  • Listview binding is not working with page class
    L laprathab

    I hv changed but it was not working.

    WPF wpf css dotnet wcf com

  • Listview binding is not working with page class
    L laprathab

    Hi, till combo is not loaded,

    <ComboBox Name="cmbTest" SelectedItem="{Binding Path=DeptID}" DisplayMemberPath="DeptName" SelectedValuePath="DeptID" ItemsSource="{Binding ElementName=This,Path=AvailablePublishers}" Style="{StaticResource GridEditStyle}" SelectionChanged="ComboBox_SelectionChanged" />

    WPF wpf css dotnet wcf com

  • Listview binding is not working with page class
    L laprathab

    Hi Karl, Thanks...now listview loaded with data. I have one more issue, combo box not loaded.pls give me some suggestions. Thanks inadvance

    WPF wpf css dotnet wcf com

  • Listview binding is not working with page class
    L laprathab

    Hi Karl, Page loading with empty listview items from the ObservableCollections.I hv posted my code behind for your reference.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using System.Collections.ObjectModel;
    using System.ComponentModel;

    namespace WPFtest
    {
    /// <summary>
    /// Interaction logic for ComboTest.xaml
    /// </summary>
    public partial class ComboTest : Page
    {

            private ObservableCollection<GameData> \_GameCollection =  new ObservableCollection<GameData>();
            private ObservableCollection<Department> \_AvailablePublishers = new ObservableCollection<Department>();
            private ObservableCollection<Role> \_AvailableRoles = new ObservableCollection<Role>();
            private GridViewColumnHeader \_CurSortCol = null;
            private SortAdorner \_CurAdorner = null;
    
    public ComboTest()
    {
      \_GameCollection.Add(new GameData { 
        GameName = "World Of Warcraft", 
        Creator = "Blizzard", 
        Publisher = "Blizzard" });
      \_GameCollection.Add(new GameData { 
        GameName = "Halo", 
        Creator = "Bungie", 
        Publisher = "Microsoft" });
      \_GameCollection.Add(new GameData { 
        GameName = "Gears Of War", 
        Creator = "Epic", 
        Publisher = "Microsoft" });
    
    
      \_AvailablePublishers.Add(new Department { DeptID = "1", DeptName = "Purchase" });
      \_AvailablePublishers.Add(new Department { DeptID = "2", DeptName = "production" });
      \_AvailablePublishers.Add(new Department { DeptID = "3", DeptName = "Inventory" });    
      //\_AvailablePublishers.Add("Microsoft");
      //\_AvailablePublishers.Add("Blizzard");
      //\_AvailablePublishers.Add("Nintendo");
      //\_AvailablePublishers.Add("Electronic Arts");
      //\_AvailablePublishers.Add("Activision");
      //\_AvailablePublishers.Add("Ubisoft");
      //\_AvailablePublishers.Add("Take-Two Interactive");
    
      InitializeComponent();
    }
    
    public ObservableCollection<GameData> GameCollection
    { get { return \_GameCollection; } }
    
    public ObservableCollection<Department> AvailablePublishers
    { get {
    
    WPF wpf css dotnet wcf com

  • Listview binding is not working with page class
    L laprathab

    Hi, I tried to bind the list view with combo box, following code worked fine with Window1.xaml the same was not working in Page1.xaml. Any one pls help to solve the above. Thanks in advance. My Xaml Code is:

    <Page x:Class="WPFtest.ComboTest"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WPFtest"
    Title="ComboTest">
    <Page.Resources>
    <local:BoolToVisibilityConverter x:Key="boolToVis" />

        <Style TargetType="{x:Type TextBlock}" 
           x:Key="GridBlockStyle">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Visibility" 
              Value="{Binding Path=IsSelected, 
              RelativeSource={RelativeSource FindAncestor, 
                        AncestorType={x:Type ListViewItem}},
              Converter={StaticResource boolToVis}, 
                         ConverterParameter=False}" />
        </Style>
    
        <Style TargetType="{x:Type FrameworkElement}" 
           x:Key="GridEditStyle">
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Visibility" 
              Value="{Binding Path=IsSelected, 
              RelativeSource={RelativeSource FindAncestor, 
                        AncestorType={x:Type ListViewItem}},
              Converter={StaticResource boolToVis}, 
                         ConverterParameter=True}" />
        </Style>
    
    </Page.Resources>
    <StackPanel>
        <TextBox Height="23" Name="textBox1" Width="120" />
        <Button Height="23" Name="btnTest" Content="test" Width="120" Click="btnTest\_Click"></Button>
        <ListView x:Name="gameListView" ItemsSource="{Binding Path=GameCollection}">
            <ListView.View>
                <GridView>
    
                    <GridViewColumn Width="140">
                        <GridViewColumnHeader Click="SortClick" 
                                  Tag="GameName" 
                                  Content="Game Name" />
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Grid>
                                    <TextBlock Text="{Binding Path=GameName}"  Style="{StaticResource GridBlockStyle}"/>
    
    WPF wpf css dotnet wcf com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups