I have a button that has four dependency properties, each representing a state the button is in. Each state's source is an image. What I would like to achieve is an ability for any state other than NormalState to bind to NormalState's value if it's own value was not provided.
I tried doing it ...
Today another episode in my seldom-updated series about building a home aluminum foundry. The technique I use for casting aluminum is called “green sand” casting not because the sand is green (though the sand I use is in fact slightly … Continue reading →
How can I rotate a rectangle forever defined in xaml. So far I only found a solution with code:
http://www.codeproject.com/Articles/23257/Beginner-s-WPF-Animation-Tutorial
which I use like this:
private void Window_Loaded_1(object sender, RoutedEventArgs e)
{
var da = new DoubleA...
hello firends i am trying to implment drag and drop in mvvm..but the strange thing is happening with me,,,when i try to drag the it,e event doesnt' fires..but when i drag the items from outside it start working..i want the first case make it working whille dragging...is there any special way?
Basically i am doing a drag and drop using textbox and labels , by dragging a label to a textbox . Textboxes and Labels are created in same for loop .
I have dynamically created textboxes ( textbox is the drop target) like this :
TextBox tbox = new TextBox();
tbox.Width = 250;
...
Drag Drop not working...hello firends i am trying to implment drag and drop in mvvm..but the strange thing is happening with me,,,when i try to drag the item event doesnt' fires..but when i drag the items from outside it start working..i want the first case make it working whille dragging...is th...
my VMs and their Views are being resolved via DI. When I want to display a VM from another I have to expose : public UIElement MyView { get { return myVM.View; } } Any thoughts on that ? It feels wrong.
so you're calling .Show() when you want to show them or?
lets say I have:
public class J : IFace
{
public string A {get; set;}
public string B {get; set;}
// ... C - Y
public string Z {get; set;}
}
where IFace has string A - D.
and I have
public class K
{
public string One {get; set;}
public string Two {get; set;}
public string Three {get; set;}
public string Four {get; set;}
public K(string one, string two, string three, string four)
{
One = one;
// .... and so on
}
}
meaning that would force the consumer to pass a IProjectProperty to PrintPageViewModel, meaning that'll make the properties always get shown on the page when its printed... meaning you can't pass garbage strings to the constructor, instead you would have to have a IProjectProperty and change those properties to garbage strings and you'll see garbage strings when the page is printed.
public class AllThings
{
List<Thing> Things { get; set; }
}
public class SomeThings
{
List<Thing> SomeThangs { get; set; }
public SomeThings(IEnumerable<Thing> things) { SomeThangs = things; }
}
lets pretend Things has 5000 items in it
right now I'm basically calculating the number of rows per page that would fit, then creating a Dictionary<int, SomeThings> to "cache" my view models (SomeThings)
if the rows per page changes... how can I adjust my Dictionary key values
but my question is how to deal with resizing. lets say after first pass every item in the List<SomeThings> Pages has SomeThangs.Count == 50. Then the size of the page changes... and I need to change items in the list from 50 to 75.
All I am asking for is a simple list in which items, which are tapped on, can show a checkmark next to them. Can Windows Phone 8.1 XAML/C# not even give me that much?
Yes, I spent my time to show you a gist. Yes, I explained what was happening in the gist and how it is behaving. You said you're not a first time programmer. If you weren't responding to my messages, what were you responding to? Either way I gave you the gist again, do what you want with it
I am building a Windows phone 8 app that has a view model property of:
public bool IsReply {get; set;}
In my xaml code, I would like to distinguish two cases:
IsReply=True
<Grid Margin="0,0,0,0">
...
</Grid>
IsReply=False
<Grid Margin="40,0,0,0">
...
</Grid>
Basically, I would like to ...
Unit test savvy people! My app munches text files. I want to give it a few constellations of test data. I plan to add this test data to my test project. Is there a good way to approach this so that my test project can access these files cleanly? I want to minimize my "try/catch" blocks here.
I would say put test files either in a central location or in the solution folder + solution. Have it open a file which has 1 file name per line, loop through the file list testing whatever
Hi All! I'm having problems with trying to get my mainview in my MVVM WPF application switching its view! I know my "Mainviewmodel" is being updated appropriately to its correct view model
I have my datatemplates defined in my app.xaml resources
is there a trigger or propertychanged event I need to raise for my view to be updated?