Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198725-May-12 5:37
Sissi198725-May-12 5:37 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Richard MacCutchan25-May-12 5:53
mveRichard MacCutchan25-May-12 5:53 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198725-May-12 6:01
Sissi198725-May-12 6:01 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Richard MacCutchan25-May-12 6:41
mveRichard MacCutchan25-May-12 6:41 
GeneralRe: Emgu CV, problem with wrapper for OpenCV Pin
Sissi198725-May-12 8:29
Sissi198725-May-12 8:29 
Questionc# combo box binding Pin
Pubudini3424-May-12 0:39
Pubudini3424-May-12 0:39 
AnswerRe: c# combo box binding Pin
Cracked-Down24-May-12 1:17
Cracked-Down24-May-12 1:17 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 2:07
Pubudini3424-May-12 2:07 
CSS
Thankx alot.I treid as you have said.But still the same mistake appears .I will paste my code lines
=================================================
class.cs
--------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace WpfApplication16
{
public class Class1
{
string lname = "Di";
public string MyProperty
{
get { return lname; }
set
{

//comboBox1.SelectedItem.ToString();
lname = Convert.ToString(value);

Debug.WriteLine("----------------------------->>>" + lname);

}
}


}
}


======================================================
MainWindow.xaml
---------------

<Window x:Class="WpfApplication16.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:WpfApplication16"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <local:Class1 x:Key="a" />
    </Window.Resources>


    <Grid>
       <ComboBox Height="34" HorizontalAlignment="Left" Margin="82,24,0,0" Name="comboBox1" VerticalAlignment="Top" Width="318" SelectedItem="{Binding Path=MyProperty, Source={StaticResource a}}" DataContext="{Binding Source={StaticResource a}}" ItemsSource="{Binding Source={StaticResource a}, Path=MyProperty.Length}" DisplayMemberPath="{Binding Path=MyProperty}">
            <ComboBoxItem Content="Cat"/>
            <ComboBoxItem Content="fish" />
            <ComboBoxItem Content="dog" />
        </ComboBox>

     
       
      
 <TextBox Height="58" HorizontalAlignment="Left" Margin="89,157,0,0" Name="textBox1" VerticalAlignment="Top" Width="338" DataContext="{Binding Source={StaticResource a}}" Text="{Binding Path=MyProperty, BindsDirectlyToSource=True}" />

    </Grid>
</Window>


















=======================================================
MainWindow.xaml.cs
-------------------

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.Diagnostics;

namespace WpfApplication16
{
///

/// Interaction logic for MainWindow.xaml
///

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();}

public string lname { get; set; }

private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{

}
}
}


This is the coding of my full test project example...If possible try to run this ad tel me what should be done.
Thank you

AnswerRe: c# combo box binding Pin
Cracked-Down24-May-12 3:05
Cracked-Down24-May-12 3:05 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 3:34
Pubudini3424-May-12 3:34 
GeneralRe: c# combo box binding Pin
Cracked-Down24-May-12 4:05
Cracked-Down24-May-12 4:05 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 6:45
Pubudini3424-May-12 6:45 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 8:02
Pubudini3424-May-12 8:02 
SuggestionRe: c# combo box binding Pin
Cracked-Down24-May-12 19:06
Cracked-Down24-May-12 19:06 
QuestionC# - Email Account Verification Pin
Cristian Capannini24-May-12 0:19
Cristian Capannini24-May-12 0:19 
AnswerRe: C# - Email Account Verification Pin
Richard MacCutchan24-May-12 3:10
mveRichard MacCutchan24-May-12 3:10 
QuestionC# windows service.. Pin
babasateesh23-May-12 23:53
babasateesh23-May-12 23:53 
AnswerRe: C# windows service.. Pin
Ravi Bhavnani24-May-12 2:11
professionalRavi Bhavnani24-May-12 2:11 
QuestionDate filter in DataView Pin
Paul Bullimore23-May-12 22:11
Paul Bullimore23-May-12 22:11 
AnswerRe: Date filter in DataView Pin
Eddy Vluggen24-May-12 0:31
professionalEddy Vluggen24-May-12 0:31 
GeneralRe: Date filter in DataView Pin
BobJanova24-May-12 0:51
BobJanova24-May-12 0:51 
AnswerRe: Date filter in DataView Pin
Eddy Vluggen24-May-12 1:00
professionalEddy Vluggen24-May-12 1:00 
GeneralRe: Date filter in DataView Pin
Paul Bullimore24-May-12 1:46
Paul Bullimore24-May-12 1:46 
AnswerRe: Date filter in DataView Pin
Luc Pattyn24-May-12 3:01
sitebuilderLuc Pattyn24-May-12 3:01 
AnswerRe: Date filter in DataView Pin
Paul Bullimore24-May-12 21:22
Paul Bullimore24-May-12 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.