xaml

Print dialog and print prewiew dialog for WPF

旧巷老猫 提交于 2020-11-30 03:44:45
问题 Is there a print dialog for WPF that is combinated whit a print preview dialog in WPF like Google Chrome or Word does? At this moment I use a the print preview dialog from Windows forms. I have also try for to use the WPF version of it. But WPF has no PrintPreviewDialog or PrintPrewiewControl . This is my code: //To the top of my class file: using Forms = System.Windows.Forms; //in a methode on the same class: PageSettings setting = new PageSettings(); setting.Landscape = true; _document =

Print dialog and print prewiew dialog for WPF

限于喜欢 提交于 2020-11-30 03:43:27
问题 Is there a print dialog for WPF that is combinated whit a print preview dialog in WPF like Google Chrome or Word does? At this moment I use a the print preview dialog from Windows forms. I have also try for to use the WPF version of it. But WPF has no PrintPreviewDialog or PrintPrewiewControl . This is my code: //To the top of my class file: using Forms = System.Windows.Forms; //in a methode on the same class: PageSettings setting = new PageSettings(); setting.Landscape = true; _document =

xamarin forms - two way binding with a picker - why cant I update a picker from code behind?

瘦欲@ 提交于 2020-11-29 23:51:21
问题 My products page only shows 'Product Name' and 'Quantity', quantity isdisplayed/ binded to the picker. For test purposes to get this working there is only 2 products loading from the VM. Wine 1 and wine 2. When the application loads, why is the picker empty with no value selected. When quantity for each item is set to 1, when loading from the VM Quantity is set to 1, the picker is just not updating when it initially loads, I know this because if I click on the empty picker and select 1.

xamarin forms - two way binding with a picker - why cant I update a picker from code behind?

陌路散爱 提交于 2020-11-29 23:50:55
问题 My products page only shows 'Product Name' and 'Quantity', quantity isdisplayed/ binded to the picker. For test purposes to get this working there is only 2 products loading from the VM. Wine 1 and wine 2. When the application loads, why is the picker empty with no value selected. When quantity for each item is set to 1, when loading from the VM Quantity is set to 1, the picker is just not updating when it initially loads, I know this because if I click on the empty picker and select 1.

How to set Visibility of Label which is bound to Textbox?

安稳与你 提交于 2020-11-29 19:15:16
问题 I have three TEXTBOX which are bound to LABEL. When I type something in TEXTBOX then TextBox text value is set to Label. Problem is i want to set Visiblity of LABEL to COLLAPSED when text box is blank and vice versa . how to do it using Visibility Convert in WPF? in .XAML file: <TextBox Name="txtEmail1" Grid.Column="1" Grid.Row="0" Text="Email" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch"/> <TextBox Name="txtEmail2" Grid.Column="1" Grid.Row="0" Text="Email2" Visibility

How to set Visibility of Label which is bound to Textbox?

我怕爱的太早我们不能终老 提交于 2020-11-29 19:14:52
问题 I have three TEXTBOX which are bound to LABEL. When I type something in TEXTBOX then TextBox text value is set to Label. Problem is i want to set Visiblity of LABEL to COLLAPSED when text box is blank and vice versa . how to do it using Visibility Convert in WPF? in .XAML file: <TextBox Name="txtEmail1" Grid.Column="1" Grid.Row="0" Text="Email" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch"/> <TextBox Name="txtEmail2" Grid.Column="1" Grid.Row="0" Text="Email2" Visibility

How to bind animationview play with LottieForms in a MVVM architecture?

橙三吉。 提交于 2020-11-29 10:29:25
问题 So i work with a animation in a listview and i want to play it once whenever i want, so i want to control it. This is the library https://github.com/martijn00/LottieXamarin I have a class: public class Info { public bool ReadMoreIconVisibility {get;set;} } And xaml: <forms:AnimationView Animation = "animationone.json" Loop = "false" IsVisible="{Binding ReadMoreIconVisibiliy}"/> I can successfully work with my xaml to hide/not hide my animation. But how do i reach the AnimationView.Play()

Mode=TwoWay, UpdateSourceTrigger=PropertyChanged or LostFocus?

做~自己de王妃 提交于 2020-11-28 08:22:19
问题 I bind a table of from a Database into a DataGrid using an Observable Collection: class ViewModel:INotifyPropertyChanged { private BDDInterneEntities _BDDInterneEntities; public ViewModel() { _BDDInterneEntities = new BDDInterneEntities(); ResultatCollection = new ObservableCollection<Resultat>(_BDDInterneEntities.Resultat); } public ObservableCollection<Resultat> ResultatCollection { get; set; } public event PropertyChangedEventHandler PropertyChanged; } This is my DataGrid: <DataGrid x:Name

Mode=TwoWay, UpdateSourceTrigger=PropertyChanged or LostFocus?

安稳与你 提交于 2020-11-28 08:14:16
问题 I bind a table of from a Database into a DataGrid using an Observable Collection: class ViewModel:INotifyPropertyChanged { private BDDInterneEntities _BDDInterneEntities; public ViewModel() { _BDDInterneEntities = new BDDInterneEntities(); ResultatCollection = new ObservableCollection<Resultat>(_BDDInterneEntities.Resultat); } public ObservableCollection<Resultat> ResultatCollection { get; set; } public event PropertyChangedEventHandler PropertyChanged; } This is my DataGrid: <DataGrid x:Name

UWP Databinding: How to set button command to parent DataContext inside DataTemplate

自古美人都是妖i 提交于 2020-11-28 07:09:20
问题 Short explanation of need: I need to fire the command of a button inside a DataTemplate, using a method from the DataContext of the ViewModel. Short explanation of problem: The templated button command only seems to be bindable to the datacontext of the item itself. The syntax used by WPF and Windows 8.1 apps to walk up the visual tree doesn't seem to work, including ElementName and Ancestor binding. I would very much prefer not to have my button command located inside the MODEL. Side Note: