|
Try looking for Spline interpolation. Basically you're looking for a continuous function or a set of functions able to interpolate the points and retain continuity.
So yes, splines are the way to go!
|
|
|
|
|
Seems like there are a bunch of different spline types. Am I looking for the cannonical spline?
|
|
|
|
|
Cubic splines are a good balance between continuity and computation speed, but B-splines can be good too.
|
|
|
|
|
Hmm... I found some Petzold code that creates a canonical spline in WPF, seems like its working (doing what I want) unless I don't know what I'm talking about which is entirely possible since I don't know the diffs between all those splines haha. All I know is that it looks like a wave interpertation of my zig-zag line. Thanks!
|
|
|
|
|
I've got a WPF TreeView that is using the structure in Josh Smith's article[^]
In my case I've only got one type of object (Unit) that has a self-referencing hierarchy. So I only have one item ViewModel and so only the one HierarchicalDataTemplate.
Everything 'works', but there are two usability issues:
1) clicking on the expander can take a while, and there's nothing to indicate to the user that its happening.
2) the expanders appear on items that have no children (I assume due to the DummyChild that gets added.
For the 1st issue, I added a INPC property IsLoading to the base item VM TreeViewItemViewModel . Then I've been round and round in circles trying to get this working...at the moment I've got...
In my UnitTreeItemViewModel in the LoadChildren override I set IsLoading before and after.
IsLoading = true;
Thread.Sleep(TimeSpan.FromSeconds(0.75).Milliseconds);
UI.UIDispatcher.Invoke((ThreadStart)delegate()
{
foreach (Unit u in UnitCache.Units.AllUnits.Where(WhereClause))
base.Children.Add(new UnitTreeItemViewModel(u, this, _uh));
});
IsLoading = false;
Finally I added a simple TextBlock that I make visible based on IsLoading :
<TextBlock Text="..."
x:Name="loadingText"
Visibility="{Binding Path=IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}"/>
But all this does is show on the child items (after they appear), not the parent
I've tried changing it to set the Parent's IsLoading, but that didn't seem to work either, the root items don't have Parents for a start...
And now I'm stuck...
I've created a Pastie of the full code here.
|
|
|
|
|
You should post your question in the forum at the end of the article, so Josh can help you.
|
|
|
|
|
I have a wpf window which is a splash screen. I want it to be displayed for a certain time interval (say 5 sec) and then it closes and new login window opens.the problem is that in splash screen there are some process undergoing so if i call sleep() they stop working and mouse pointer shows busy symbol.
|
|
|
|
|
Sleep is a blocking operation. Of course it will show the busy symbol.
The normal way to do this is to load your data on a background thread.
|
|
|
|
|
can you show sample code for that.possibly using System.Timers.Timer?
|
|
|
|
|
Task.Factory.StartNew(()=>{
});
|
|
|
|
|
If I have an xml document of books, like:
<Books>
<Book>
<Title>WPF For The Hard-of-Learning</Title>
<Category>N</Category>
</Book>
</Books>
and an xml document of book categories:
<Categories>
<Category>
<ID>F</ID>
<Name>Fiction</Name>
</Category>
<Category>
<ID>N</ID>
<Name>Non-Fiction</Name>
</Category>
</Categories>
is there a way to bind the element value from the second document that is associated with an element in the first document?
To clarify using the above xml document examples, I'd like to display the book title and its category name (Non-Fiction), not its Category code (N).
In a code-behind file I'd like to load into XmlDocument objects the xml from a file that holds the Books xml and from a file that holds the Categories xml. In the code-behind I would assign the xml documents as the Document property of a couple XmlDataProviders defined in the XAML.
|
|
|
|
|
In your code behind, should be ViewModel, create a class, a Model, with the Book properties and add an additional property for the Category. Insert the records from the Book xml and update the item with the Category details.
This is the normal process of creating a model to match the UI requirements. Your UI will often not match the database structure, that is why there are such concepts as DAL, Mode, View, ViewModel.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all ,
I need to create add in project in silver-light mvvm project , i'm complete new to create add in projects please help me .i checked in online and i found one project from this site .but it is working for only visual studio . I need to work for my project . please help me ...
Thank you .
|
|
|
|
|
Victor
Visual Studio is and IDE, Integrated Development Environment, your project and the article you found are BOTH built on VS, the article is just another project built by a developer. How you can call yourself a "Senior" developer in your profile baffles me!
Do some research into MEF[^]. However I would suggest you need to do some more basic reading before tackling MEF!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: How you can call yourself a "Senior" developer Means you can use Copy & Paste.
|
|
|
|
|
I think even that may be beyond him from the OP.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello Mycroft Holmes ,
Thank you for your response , yes i was downloaded the sample project and try to understanding how that is implemented (this is not use for me but it will give some idea how to start,so that i downloaded.) Frankly i don't know how to create a add in project. I thought some one will give idea how start while posting this question but, i got different answer. please have any idea help me still if you think this is useless question just ignore this .
Thanks again.
|
|
|
|
|
Why have you sent this to me? I am (obviously) not Mycroft Holmes.
|
|
|
|
|
What do you mean by Add in Silverlight Project? This isn't a combination I've come across before - perhaps you could explain what effect you're expecting.
|
|
|
|
|
Hello together,
I´m struggeling with connection of two table in a datagrid.
What is the situation. I have one table (tbl_customer)which stores details about a customer, also the categoryID for the customer_category. A second table has the detailled information about the customer category.
So the categoryID in tbl_Customer is the foreign key and links to the second table tbl_Category. oidCategory (PK), txtLabel (string)).
Setting the ItemsSource of the datagrid to tbl_Customer I get all the details of the tbl_Customer (and the categoryID as int). Now I would like to have the txtLabel from the tbl_Category presented in the datagrid as well.
I know how to bind the foreign datas with a ComboBox, but not with as a textbox.
I hope I could explain my problem in a more or less understandable way.Has someone an idea where I can find a tutorial or which tags to use searching for more information.
Thanks for help in advance!
BR Thomas
|
|
|
|
|
So build a Model that meets your requirements in the viewmodel and load it up from the 2 tables, not everything you need is going to come from a nice little black box!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I have to implement voice instruction to user in my WPF application.
Example: Please Enter Your Name.
Please suggest me any approach.
|
|
|
|
|
|
Hi,
I want to build my WPF project for Class Library Type/Windows Application Type. Its working for Windows application but not working for WPF application, kindly help me.
|
|
|
|
|
Eh? What? Do you mean that you want your application executable to reside inside a DLL and you want another piece of code kick off your application?
|
|
|
|