Search Results

Search found 6 results on 1 pages for 'aviatrix'.

Page 1/1 | 1 

  • WPF ListBox/View Data Binding weird result

    - by Aviatrix
    I have this problem when i try to synchronize a observable list with listbox/view it displays the first item X times (x total amount of records in the list) but it doesn't change the variable's here is the XAML <ListBox x:Name="PostListView" BorderThickness="0" MinHeight="300" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" VerticalContentAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" DataContext="{Binding Source={StaticResource PostListData}}" ItemsSource="{Binding Mode=OneWay}" IsSynchronizedWithCurrentItem="True" MinWidth="332" SelectedIndex="0" SelectionMode="Extended" AlternationCount="1"> <ListBox.ItemTemplate> <DataTemplate> <DockPanel x:Name="SinglePost" VerticalAlignment="Top" ScrollViewer.CanContentScroll="True" ClipToBounds="True" Width="333" Height="70" d:LayoutOverrides="VerticalAlignment" d:IsEffectDisabled="True"> <DockPanel.DataContext> <local:PostList/> </DockPanel.DataContext> <StackPanel x:Name="AvatarNickHolder" Width="60"> <Label x:Name="Nick" HorizontalAlignment="Center" Margin="5,0" VerticalAlignment="Top" Height="15" Content="{Binding Path=pUsername, FallbackValue=pUsername}" FontFamily="Arial" FontSize="10.667" Padding="5,0"/> <Image x:Name="Avatar" HorizontalAlignment="Center" Margin="5,0,5,5" VerticalAlignment="Top" Width="50" Height="50" IsHitTestVisible="False" Source="1045443356IMG_0972.jpg" Stretch="UniformToFill"/> </StackPanel> <TextBlock x:Name="userPostText" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="10.667" Text="{Binding Path=pMsg, FallbackValue=pMsg}" TextWrapping="Wrap"/> </DockPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> and here is the ovservable list class public class PostList : ObservableCollection<PostData> { public PostList() : base() { Add(new PostData("this is test msg", "Cather", "1045443356IMG_0972.jpg")); Add(new PostData("this is test msg1", "t1", "1045443356IMG_0972.jpg")); Add(new PostData("this is test msg2", "t2", "1045443356IMG_0972.jpg")); Add(new PostData("this is test msg3", "t3", "1045443356IMG_0972.jpg")); Add(new PostData("this is test msg4", "t4", "1045443356IMG_0972.jpg")); Add(new PostData("this is test msg5", "t5", "1045443356IMG_0972.jpg")); // Add(new PostData("Isak", "Dinesen")); // Add(new PostData("Victor", "Hugo")); // Add(new PostData("Jules", "Verne")); } } public class PostData { private string Username; private string Msg; private string Avatar; private string LinkAttached; private string PicAttached; private string VideoAttached; public PostData(string msg ,string username, string avatar=null, string link=null,string pic=null ,string video=null) { this.Username = username; this.Msg = msg; this.Avatar = avatar; this.LinkAttached = link; this.PicAttached = pic; this.VideoAttached = video; } public string pMsg { get { return Msg; } set { Msg = value; } } public string pUsername { get { return Username; } set { Username = value; } } public string pAvatar { get { return Avatar; } set { Avatar = value; } } public string pLink { get { return LinkAttached; } set { LinkAttached = value; } } public string pPic { get { return PicAttached; } set { PicAttached = value; } } public string pVideo { get { return VideoAttached; } set { VideoAttached = value; } } } Any ideas ?

    Read the article

  • WPF ListView Data Binding wont synchronize

    - by Aviatrix
    my listview will display only the item that its added by the constructor and it wont add the items that i add dynamically public class PostList : ObservableCollection<PostData> { public PostList() : base() { Add(new PostData("Isak", "Dinesen")); // Add(new PostData("Victor", "Hugo")); // Add(new PostData("Jules", "Verne")); } public void AddToList (string[] data){ string username2, msg; msg = data[0]; username2 = data[1]; Add(new PostData(msg, username2)); } } public class PostData { private string Username; private string Msg; private string Avatar; private string LinkAttached; private string PicAttached; private string VideoAttached; public PostData(string msg ,string username, string avatar=null, string link=null,string pic=null ,string video=null) { this.Username = username; this.Msg = msg; this.Avatar = avatar; this.LinkAttached = link; this.PicAttached = pic; this.VideoAttached = video; } public string pMsg { get { return Msg; } set { Msg = value; } } public string pUsername { get { return Username; } set { Username = value; } } ..... ..... } Xaml <ListView x:Name="PostListView" BorderThickness="0" MinHeight="300" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" VerticalContentAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" IsSynchronizedWithCurrentItem="True" MinWidth="332" SelectedIndex="0" SelectionMode="Extended" AlternationCount="1" ItemsSource="{Binding Source={StaticResource PostListData}}"> <ListView.ItemTemplate> <DataTemplate> <DockPanel x:Name="SinglePost" VerticalAlignment="Top" ScrollViewer.CanContentScroll="True" ClipToBounds="True" Width="333" Height="70" d:LayoutOverrides="VerticalAlignment" d:IsEffectDisabled="True"> <StackPanel x:Name="AvatarNickHolder" Width="60"> <Label x:Name="Nick" HorizontalAlignment="Center" Margin="5,0" VerticalAlignment="Top" Height="15" Content="{Binding Path=pUsername}" FontFamily="Arial" FontSize="10.667" Padding="5,0"/> <Image x:Name="Avatar" HorizontalAlignment="Center" Margin="5,0,5,5" VerticalAlignment="Top" Width="50" Height="50" IsHitTestVisible="False" Source="1045443356IMG_0972.jpg" Stretch="UniformToFill"/> </StackPanel> <TextBlock x:Name="userPostText" Margin="0,0,5,0" VerticalAlignment="Center" FontSize="10.667" Text="{Binding Path=pMsg}" TextWrapping="Wrap"/> </DockPanel> </DataTemplate> </ListView.ItemTemplate> </ListView>

    Read the article

  • RoR function help

    - by Aviatrix
    Can someone write a function for me on RoR , i simply don't have the time to study Ruby and RoR for just one time use. The function should do the following things : 1) have an array with variables 2) for each variable in the array execute 4-5 other functions get the results and insert them in another table in the same DB table name - refined CityName varchar Subdomain varchar = the varriable in the array Nearby text State varchar ZipCodes text AreaCodes text Some of the functions return arrays. i will really apreciate the help ! Thanks in advance.

    Read the article

  • PHP Plugin based App design

    - by Aviatrix
    Hello , I was wondering from where i can get more info on how to build plugin based Apps (design patterns , etc ). Any books and references with detailed information would be helpful. Also i like how WordpPress was made , if someone can point me on how to build something like WordpPress did would be awesome. Thanks !

    Read the article

  • C# 4.0 how to pass variables to threads?

    - by Aviatrix
    How would i pass some parameters to a new thread that runs a function from another class ? What i'm trying to do is to pass an array or multiple variables to a function that sits in another class and its called by a new thread. i have tried to do it like this Functions functions = new Functions(); string[] data; Thread th = new Thread(new ParameterizedThreadStart(functions.Post())); th.Start(data); but it shows error "No overload for method 'Post' takes 0 arguments" Any ideas ?

    Read the article

1