Click here to Skip to main content
12,694,842 members (33,063 online)

Silverlight / WPF

 
GeneralRe: Byte[] of PDF into image Pin
Pete O'Hanlon9-Oct-12 22:51
protectorPete O'Hanlon9-Oct-12 22:51 
GeneralRe: Byte[] of PDF into image Pin
GomathiR10-Oct-12 5:22
memberGomathiR10-Oct-12 5:22 
QuestionSL application tha treads local registries Pin
picasso25-Oct-12 19:51
memberpicasso25-Oct-12 19:51 
AnswerRe: SL application tha treads local registries Pin
Richard MacCutchan5-Oct-12 23:37
mvpRichard MacCutchan5-Oct-12 23:37 
QuestionHow to dynamically load Theme in Application? Pin
Savalia Manoj M4-Oct-12 2:27
memberSavalia Manoj M4-Oct-12 2:27 
AnswerRe: How to dynamically load Theme in Application? Pin
Pete O'Hanlon4-Oct-12 2:55
protectorPete O'Hanlon4-Oct-12 2:55 
AnswerRe: How to dynamically load Theme in Application? Pin
Shrinivas Ramesh Ambat17-Oct-12 3:38
memberShrinivas Ramesh Ambat17-Oct-12 3:38 
GeneralRe: How to dynamically load Theme in Application? Pin
Pete O'Hanlon17-Oct-12 4:07
protectorPete O'Hanlon17-Oct-12 4:07 
GeneralRe: How to dynamically load Theme in Application? Pin
Wayne Gaylard17-Oct-12 4:10
mentorWayne Gaylard17-Oct-12 4:10 
QuestionProblem in flow direction when value is right to left in Telerik Pin
Hossein Khalaj3-Oct-12 21:19
memberHossein Khalaj3-Oct-12 21:19 
AnswerRe: Problem in flow direction when value is right to left in Telerik Pin
Pete O'Hanlon3-Oct-12 21:21
protectorPete O'Hanlon3-Oct-12 21:21 
GeneralRe: Problem in flow direction when value is right to left in Telerik Pin
Hossein Khalaj3-Oct-12 21:23
memberHossein Khalaj3-Oct-12 21:23 
GeneralRe: Problem in flow direction when value is right to left in Telerik Pin
Hossein Khalaj4-Oct-12 23:48
memberHossein Khalaj4-Oct-12 23:48 
Questionbinding: not work property Mode=TwoWay and UpdateSourceTrigger Pin
dominioYP3-Oct-12 1:25
memberdominioYP3-Oct-12 1:25 
hello
My program has a ListView, which is connected to an ObservableCollection.
If I add values ​​to the ObservableCollection, I can see them in the ListView.
But if I change an object in the ObservableCollection, the change is not seen in the ListView. The modification is made by changing the name in the textbox side and clicking the "CAMBIA"




<Window x:Class="WpfApplication3.bindingListBoxTOstring"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="bindingListV" Height="300" Width="300"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        >
    <Grid>


        <ListView Name="lv" ItemsSource="{Binding ListBoxCollection, UpdateSourceTrigger=PropertyChanged}" Margin="12,0,128,50" SelectionChanged="lv_SelectionChanged">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="profilo" Width="200" 
                                            DisplayMemberBinding="{Binding nome, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                </GridView>
            </ListView.View>
        </ListView>
        <Label Content="Cambia valore" Height="28" HorizontalAlignment="Left" Margin="164,23,0,0" Name="label1" VerticalAlignment="Top" Width="102" />
        <TextBox Height="32" HorizontalAlignment="Left" Margin="154,56,0,0" Name="textBox1" VerticalAlignment="Top" Width="114" />
        <Button Content="cambia" Height="23" HorizontalAlignment="Left" Margin="177,107,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
    </Grid>
</Window>



namespace WpfApplication3
{
    public partial class bindingListBoxTOstring : Window
    {
        
        ObservableCollection<ListBoxData> _ListBoxCollection =
            new ObservableCollection<ListBoxData>();



        public bindingListBoxTOstring()
        {
            InitializeComponent();
            //DataContext = this;
            _ListBoxCollection.Add(new ListBoxData { nome = "netgear" });
            _ListBoxCollection.Add(new ListBoxData { nome = "alice13" });
        }


        public ObservableCollection<ListBoxData> ListBoxCollection
        { get { return _ListBoxCollection; } }

        public class ListBoxData
        {
            public string nome { get; set; }
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ListBoxData x = lv.SelectedItem as ListBoxData;
            x.nome = (textBox1.Text) != string.Empty ? (textBox1.Text) : string.Empty ;
        }

        private void lv_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBoxData x = lv.SelectedItem as ListBoxData;
            textBox1.Text = x.nome;
        }
    }
}


AnswerRe: binding: not work property Mode=TwoWay and UpdateSourceTrigger Pin
Pete O'Hanlon3-Oct-12 1:54
protectorPete O'Hanlon3-Oct-12 1:54 
GeneralRe: binding: not work property Mode=TwoWay and UpdateSourceTrigger Pin
dominioYP3-Oct-12 23:24
memberdominioYP3-Oct-12 23:24 
QuestionHow do I reference embedded resources in Xaml? Pin
Gil Yoder2-Oct-12 19:57
memberGil Yoder2-Oct-12 19:57 
AnswerRe: How do I reference embedded resources in Xaml? Pin
Gil Yoder4-Oct-12 8:52
memberGil Yoder4-Oct-12 8:52 
Questionsilverlight Pin
rameshchetu30-Sep-12 10:12
memberrameshchetu30-Sep-12 10:12 
AnswerRe: silverlight Pin
Pete O'Hanlon30-Sep-12 10:45
protectorPete O'Hanlon30-Sep-12 10:45 
AnswerRe: silverlight Pin
Kenneth Haugland30-Sep-12 23:36
memberKenneth Haugland30-Sep-12 23:36 
AnswerRe: silverlight Pin
Abhinav S3-Oct-12 21:40
mvpAbhinav S3-Oct-12 21:40 
QuestionCheckk For WCF Service Running & Exit Pin
Kevin Marois29-Sep-12 10:51
memberKevin Marois29-Sep-12 10:51 
QuestionSendMessage in C# WPF Pin
dominioYP28-Sep-12 7:11
memberdominioYP28-Sep-12 7:11 
AnswerRe: SendMessage in C# WPF Pin
Pete O'Hanlon29-Sep-12 11:30
protectorPete O'Hanlon29-Sep-12 11:30 
GeneralRe: SendMessage in C# WPF Pin
dominioYP29-Sep-12 13:08
memberdominioYP29-Sep-12 13:08 
GeneralRe: SendMessage in C# WPF Pin
Pete O'Hanlon29-Sep-12 21:45
protectorPete O'Hanlon29-Sep-12 21:45 
QuestionNew to .net/ previous programming background Pin
ljv_az27-Sep-12 9:29
memberljv_az27-Sep-12 9:29 
AnswerRe: New to .net/ previous programming background Pin
Richard MacCutchan27-Sep-12 10:47
mvpRichard MacCutchan27-Sep-12 10:47 
GeneralRe: New to .net/ previous programming background Pin
ljv_az27-Sep-12 11:00
memberljv_az27-Sep-12 11:00 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan27-Sep-12 22:16
mvpRichard MacCutchan27-Sep-12 22:16 
GeneralRe: New to .net/ previous programming background Pin
ljv_az28-Sep-12 9:14
memberljv_az28-Sep-12 9:14 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan28-Sep-12 22:57
mvpRichard MacCutchan28-Sep-12 22:57 
GeneralRe: New to .net/ previous programming background Pin
ljv_az29-Sep-12 8:29
memberljv_az29-Sep-12 8:29 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan29-Sep-12 8:34
mvpRichard MacCutchan29-Sep-12 8:34 
GeneralRe: New to .net/ previous programming background Pin
ljv_az29-Sep-12 17:46
memberljv_az29-Sep-12 17:46 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan29-Sep-12 22:38
mvpRichard MacCutchan29-Sep-12 22:38 
GeneralRe: New to .net/ previous programming background Pin
ljv_az30-Sep-12 7:23
memberljv_az30-Sep-12 7:23 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan30-Sep-12 7:59
mvpRichard MacCutchan30-Sep-12 7:59 
GeneralRe: New to .net/ previous programming background Pin
ljv_az30-Sep-12 8:51
memberljv_az30-Sep-12 8:51 
GeneralRe: New to .net/ previous programming background Pin
Richard MacCutchan30-Sep-12 22:57
mvpRichard MacCutchan30-Sep-12 22:57 
AnswerRe: New to .net/ previous programming background Pin
Pete O'Hanlon30-Sep-12 8:48
protectorPete O'Hanlon30-Sep-12 8:48 
AnswerRe: New to .net/ previous programming background Pin
Blikkies2-Oct-12 6:04
memberBlikkies2-Oct-12 6:04 
GeneralRe: New to .net/ previous programming background Pin
Alisaunder3-Oct-12 18:10
memberAlisaunder3-Oct-12 18:10 
AnswerRe: New to .net/ previous programming background Pin
_Maxxx_7-Oct-12 18:17
member_Maxxx_7-Oct-12 18:17 
QuestionJesús Alvarez Manrique Pin
Member 901299827-Sep-12 7:47
memberMember 901299827-Sep-12 7:47 
AnswerRe: Jesús Alvarez Manrique Pin
Yayozama27-Sep-12 8:37
memberYayozama27-Sep-12 8:37 
GeneralRe: Jesús Alvarez Manrique Pin
Member 901299827-Sep-12 8:57
memberMember 901299827-Sep-12 8:57 
GeneralRe: Jesús Alvarez Manrique Pin
Emmanuel Medina Lopez27-Sep-12 12:33
memberEmmanuel Medina Lopez27-Sep-12 12:33 
GeneralRe: Jesús Alvarez Manrique Pin
Member 901299827-Sep-12 8:59
memberMember 901299827-Sep-12 8:59 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 17 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid