Click here to Skip to main content
15,918,808 members
Home / Discussions / WPF
   

WPF

 
Questionvalidation for 2 DateTimePicker (start date and end date) in WPF Pin
Yogi_vns0073-Oct-13 2:04
Yogi_vns0073-Oct-13 2:04 
AnswerRe: validation for 2 DateTimePicker (start date and end date) in WPF Pin
mohitsaxena110-Oct-13 8:09
professionalmohitsaxena110-Oct-13 8:09 
Questionget two columns Pin
picasso21-Oct-13 17:52
picasso21-Oct-13 17:52 
QuestionWPF Text box style Pin
Yogi_vns00726-Sep-13 4:16
Yogi_vns00726-Sep-13 4:16 
AnswerRe: WPF Text box style Pin
Kenneth Haugland26-Sep-13 4:29
mvaKenneth Haugland26-Sep-13 4:29 
AnswerRe: WPF Text box style Pin
Bernhard Hiller26-Sep-13 21:59
Bernhard Hiller26-Sep-13 21:59 
AnswerRe: WPF Text box style Pin
Abhinav S27-Sep-13 22:59
Abhinav S27-Sep-13 22:59 
GeneralRe: WPF Text box style Pin
Yogi_vns0072-Oct-13 18:46
Yogi_vns0072-Oct-13 18:46 
GeneralRe: WPF Text box style Pin
Mycroft Holmes2-Oct-13 22:55
professionalMycroft Holmes2-Oct-13 22:55 
QuestionMEF and ActiveX control in .NET Pin
Raajikiwi24-Sep-13 19:20
Raajikiwi24-Sep-13 19:20 
QuestionHow to print & preview Radgridview row per page in wpf Pin
ramkie24-Sep-13 18:42
ramkie24-Sep-13 18:42 
AnswerRe: How to print & preview Radgridview row per page in wpf Pin
Abhinav S24-Sep-13 20:39
Abhinav S24-Sep-13 20:39 
QuestionWPF DataGrid with DataGrid in RowDetailsTemplate Pin
Kevin Marois24-Sep-13 6:18
professionalKevin Marois24-Sep-13 6:18 
QuestionWPF MVVM Determine When Property On Model Changes Pin
Kevin Marois24-Sep-13 5:11
professionalKevin Marois24-Sep-13 5:11 
AnswerRe: WPF MVVM Determine When Property On Model Changes Pin
Pete O'Hanlon24-Sep-13 5:27
mvePete O'Hanlon24-Sep-13 5:27 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Kevin Marois24-Sep-13 5:29
professionalKevin Marois24-Sep-13 5:29 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Pete O'Hanlon24-Sep-13 5:44
mvePete O'Hanlon24-Sep-13 5:44 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Kevin Marois24-Sep-13 5:45
professionalKevin Marois24-Sep-13 5:45 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Pete O'Hanlon24-Sep-13 7:04
mvePete O'Hanlon24-Sep-13 7:04 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
SledgeHammer0124-Sep-13 8:21
SledgeHammer0124-Sep-13 8:21 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Pete O'Hanlon24-Sep-13 8:24
mvePete O'Hanlon24-Sep-13 8:24 
GeneralRe: WPF MVVM Determine When Property On Model Changes Pin
Mycroft Holmes24-Sep-13 21:25
professionalMycroft Holmes24-Sep-13 21:25 
QuestionHow to create multi focus in Surface application so multiple users can use application togather on sur 40 Pin
sacpundir15-Sep-13 21:29
professionalsacpundir15-Sep-13 21:29 
Questiona question about MVVM Pin
lijizhe12-Sep-13 22:38
lijizhe12-Sep-13 22:38 
have used a RadTileView,
<usercontrol
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
="" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlnsBig Grin | :-D ="http://schemas.microsoft.com/expression/blend/2008" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" x:class="DemoShow.usercontrol.UserControl1" mc:ignorable="d">
<usercontrol.resources>


<Style.Triggers>
<Trigger Property="IsEnabled" Value="true">
<Setter Property="BorderThickness" Value="1,1,1,1" />
</trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="BorderThickness" Value="0,0,0,0"/>
</trigger>
</style.Triggers>


<datatemplate x:key="headerTemplate">
<textblock text="{Binding Number}">

<datatemplate x:key="contentTemplate">
<grid margin="5">
<grid.rowdefinitions>
<rowdefinition height="Auto">
<rowdefinition height="Auto">
<rowdefinition height="Auto">
<rowdefinition height="Auto">
<rowdefinition height="Auto">
<rowdefinition height="Auto">
<rowdefinition height="Auto">

<textbox grid.row="0" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding Name,Mode=TwoWay}">
<textbox grid.row="1" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding Birthday,Mode=TwoWay}">
<textbox grid.row="2" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding age,Mode=TwoWay}">
<textbox grid.row="3" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding Sex,Mode=TwoWay}">
<textbox grid.row="4" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding CheckType,Mode=TwoWay}">
<textbox grid.row="5" style="{StaticResource TextBoxThumb}" isenabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" text="{Binding Time,Mode=TwoWay}">

<i:interaction.triggers>
<i:eventtrigger eventname="Click">
<i:invokecommandaction command="{Binding DataContext.LoginCommand,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}, AncestorLevel=1}}"
="" commandparameter="{Binding Name}">







<grid>
<telerik:radtileview
="" isautoscrollingenabled="True" isdockingenabled="True" isvirtualizing="True" columnscount="2" rowheight="200" columnwidth="300" minimizedcolumnwidth="300" minimizedrowheight="200" minimizeditemsposition="Bottom" contenttemplate="{StaticResource contentTemplate}" itemssource="{Binding Path=Items,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" itemtemplate="{StaticResource headerTemplate}" preservepositionwhenmaximized="False" tilestatechangetrigger="SingleClick">






i change the BindingList<people>

public class MainViewModel : ViewModelBase
{
private BindingList<people> items;
private BindingList<people> itemstem;

public ICommand LoginCommand
{
get
{
return new RelayCommand<object>(
(parameter) =>
{
ChangeInputEnable(parameter);
}
);
}
}

ui not update public class People
{
public string Name { get; set; }
public string Birthday { get; set;}
public string age { get; set; }
public string Sex { get; set; }
public string CheckType { get; set; }
public string Time { get; set; }
public string Number { get; set; }
public bool ShowFlag { get; set; }
}

private void ChangeInputEnable(object parameter)
{

//string str = parameter.ToString();
//var obj = items.FirstOrDefault(x => x.Name == str);
//int n = items.IndexOf(obj);
//MessageBox.Show(items[n].ShowFlag.ToString());
//if (obj != null)
//{
// if (obj.ShowFlag) obj.ShowFlag = false;
// else obj.ShowFlag = true;

// RaisePropertyChanged("ShowFlag");
// RaisePropertyChanged("Items");
// MessageBox.Show(items[n].ShowFlag.ToString());
// MessageBox.Show(str);
//}


string str = parameter.ToString();
var obj = items.FirstOrDefault(x => x.Name == str);
int n = items.IndexOf(obj);
if (obj != null)
{
if (obj.ShowFlag) obj.ShowFlag = false;
else obj.ShowFlag = true;
obj.Name += "tttt";
items.ListChanged += (o, e) => RaisePropertyChanged(("Items"));

itemstem = items;
items = null;
items = itemstem;
RaisePropertyChanged("Name");

RaisePropertyChanged("Items");
}


//items.Add(new People()
//{
// Birthday = "1985-08-08",
// age = "38",
// Sex = "Male",
// CheckType = "PET-CT",
// Time = "10:30",
// Name = "tttt",
// Number = "10"
//});

//RaisePropertyChanged("Items");


}

public MainViewModel()
{
List<people> itemsSource = new List<people>();
for (int i = 0; i < 5; i++)
{
itemsSource.Add(new People()
{
Birthday = "1985-08-08",
age = "38",
Sex = "Male",
CheckType = "PET-CT",
Time = "10:30",
Name = this.names[i % 12],
Number = i.ToString(),
ShowFlag =true
});
}

this.items = new BindingList<people>(itemsSource);
}


public BindingList<people> Items
{
get
{
return this.items;
}
set
{
this.items =value;
RaisePropertyChanged("Items");
}
}

private List<string> names = new List<string>
{
"Andrew Fuller",
"Martin Sommer",
"Anne Dogsworth",
"Steven Buchanan",
"Janet Leverling",
"Michael Suyama",
"Margaret Peacock",
"Robert King",
"John Steel",
"Laura Gallahan",
"Nancy Davolio",
"Ann Devon"
};
}

can you help me ?
AnswerRe: a question about MVVM Pin
Richard MacCutchan12-Sep-13 23:56
mveRichard MacCutchan12-Sep-13 23:56 

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.