|
Thanks for your valuable responses.
I was a wpf beginner and I tried and I found plenty of examples But I couldn't achieve what I want exactly. So I posted. Anyways, thanks again for your valuable responses.
|
|
|
|
|
How to answer a question[^]
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Infragistics has a tree view that supports hierarchical structures by default.
|
|
|
|
|
There's an example of this being done here: http://msdn.microsoft.com/en-us/library/ms171645(v=vs.80).aspx[^]
The example creates a windows explorer style interface, with the directory data in the treeview, and the files in the listview - but you could easily adapt this so that the lowest level of directories were in the listview instead.
Hope that helps.
JB
|
|
|
|
|
I found the answers from Kevin Marois amd Mycroft Holmes to be very disrespectful and insulting. I am really sorry for this. They could have instead provided some rough guidelines or chosen not to answer. But no moderator should have given them the right to answer in such a disrespectful manner.
|
|
|
|
|
I completely agree. Rudeness is not required to instruct someone how to research and post questions in the forums.
Even a simple link to How to get an answer to your question[^] would not be disrespectful and at the same type will help new users how to start and not run away from CP.
If they run away from CP, they will never get the chance to become contributors on the future.
While I'm at it, maybe I should post this link to them:
How to answer a question[^]
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Dimitrios Kalemis wrote: insulting
Wow you must have such a sensitive soul. If you read the response you will note that I was not trying to answer the OPs question but give an explanation of the 1 vote. I dislike the tendency to simply respond with a 1 vote to a lousy question.
The original question showed a complete lack of effort to help himself and therefore deserved no respect whatsoever.
I am a little surprised the OP made the effort to create an account to ask the question when it would have been simpler and quicker to do the tiniest bit of research to help himself. I am impressed however that you and Fabio did not resort to tit for tat 1 voting.
As this has the potential to degrade into a flame war I will leave the discussion here.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I am impressed however that you and Fabio did not resort to tit for tat 1 voting.
I don't disagree with the voting, I disagree with making the OP feel stupid with things like:
Mycroft Holmes wrote:
Oh if you really are after someone to code this for you then go to rentacoder or elance with a few pennies, that is what those sites are for!
Don't want that to happen:
Mycroft Holmes wrote: As this has the potential to degrade into a flame war I will leave the discussion here.
Edit:
Mycroft Holmes wrote: The original question showed a complete lack of effort to help himself and therefore deserved no respect whatsoever.
Again: How to answer a question[^]
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
modified 23-May-12 13:48pm.
|
|
|
|
|
Fabio Franco wrote: Again: How
to answer a question[^]
You had already made your point. Editing your post to put that in was unnecessary. I haven't voted on your post, but it appears to have offended someone (and I don't think it's Mycroft).
|
|
|
|
|
Pete O'Hanlon wrote: Editing your post to put that in was unnecessary.
It seemed that he had not read what was there when I pointed it in the first time, because he claimed the OP deserved no respect, so I pointed it out again.
Pete O'Hanlon wrote: I haven't voted on your post, but it appears to have offended someone (and I don't think it's Mycroft).
Maybe, or maybe someone just does not agree with me and voted me down.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Pete O'Hanlon wrote: and I don't think it's Mycroft
You are right, waste of time.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i try to develop project on wp7 i work on Microsoft Visual Basic 2010 for windows phone
but when run program i get error
(
Erro1 Could not find file 'C:\Users\admin-org\Documents\Visual Studio 2010\Projects\TCPclient1\TCPclient1\obj\Debug\XapCacheFile.xml'. Please rebuild the solution and try again. 0 0
)
What should I do to prevent this error?
modified 21-May-12 12:46pm.
|
|
|
|
|
Please rebuild the solution and try again.
|
|
|
|
|
ok..... but how i can do it
|
|
|
|
|
Build->Clean Solution. This will clear the bin/Debug folder.
Then Build->Rebuild Solution.
This will rebuild the entire solution.
If the file is still missing, I would suggest making sure it's added to the project, but I think you would see obvious issues like that...
|
|
|
|
|
thnx so much
|
|
|
|
|
Np. Dont be afraid to plus five.
|
|
|
|
|
Hi, i tried this code to parse CSV file and save data in a wpf data grid, the code is correct but i can't store values on datagrid
this is a class wich contain the code:
public class CsvParser
{
public List<string[]> ReadAndParseData(string path, char separator)
{
var parseData = new List<string[]>();
using (var sr = new StreamReader(path))
{
string line;
while ((line = sr.ReadLine()) != null)
{
string[] row = line.Split(separator);
parseData.Add(row);
}
}
return parseData;
}
}
}
the is the code behind; assigned to event click on boutton
List<string[]> parseData = csv.ReadAndParseData(datasource, ';');
foreach (string[] row in parseData)
{
MessageBox.Show(""+row.GetValue(0));// i get the correct value
dgvreceipient.Items.Add(row.....);// but i get a empty datagrid
}
|
|
|
|
|
Why do you persist in trying to do this the wrong way? You could solve this simply with an ObservableCollection and a little bit of binding.
public class CsvReaderViewModel
{
public ObservableCollection<string> CsvLines { get; set; }
public CsvReaderViewModel(string datasource)
{
List<string> csv = new CsvParser().ReadAndParseData(datasource, ';');
CsvLines = new CsvLines(csv);
}
} Then, "in your code behind", all you need do is (make sure you have called InitializeComponent before you try this):
CsvReaderViewModel vm = new CsvReaderViewModel("my source");
DataContext = vm; Finally, you just need to set your grid ItemsSource to CsvLines .
BTW - you have posted and been told often enough, format your code blocks using the pre tags. It's not hard to do.
|
|
|
|
|
thank you, tried it, but i can't debug solution when i add
CsvReaderViewModel vm = new CsvReaderViewModel("my source");
DataContext = vm;
near InitializeComponent();
|
|
|
|
|
Hi,
I'm using a DockPanel in my application and am struggling to have my buttons appear on the let side of the panel. They are all placed centrally. My XAML code is as follows
<pre lang="xml">
<ribbon:RibbonApplicationMenuItem x:Name="OpenItems" ImageSource="Images\Open.ico" Header="Open">
<DockPanel LastChildFill="True" DockPanel.Dock="Left" HorizontalAlignment="Left">
<ribbon:RibbonButton DockPanel.Dock="Top" x:Name="OpenBtn1" SmallImageSource="/WpfRibbonApplication1;component/Images/Open.ico" Label="Open" />
<ribbon:RibbonButton DockPanel.Dock="Bottom" x:Name="OpenBtn2" SmallImageSource="/WpfRibbonApplication1;component/Images/Open.ico" Label="Open Specific File" />
</DockPanel> </ribbon:RibbonApplicationMenuItem>
</pre>
I'm aiming to produde a DockPanel that looks like the Micorsoft Word, with selectable item that has Icon on the left, and then two rows of text.
Can anyone either point out where I have gone wrong and point out the error in my code, or point me to a suitable tutorial to manage the layout of my dock panel.
TIA
Tony
|
|
|
|
|
Set HorizontalAlignment="Left" on your RibbonButton elements instead.
|
|
|
|
|
Assuming this is what you are suggesting
<pre lang="xml">
<ribbon:RibbonButton HorizontalAlignment="Left" DockPanel.Dock="Top" Label="Open" />
</pre>
That doesnt work, I'm still getting the button appearing centrally.
Thanks for the reply though.
Tony
|
|
|
|
|
Sorry, I see what you're trying to do here. I ran this through Blend to get this:
<ribbon:RibbonApplicationMenuItem
x:Name="OpenItems" Header="Open" HorizontalAlignment="Left" VerticalAlignment="Top">
<DockPanel DockPanel.Dock="Left" HorizontalAlignment="Left">
<ribbon:RibbonButton DockPanel.Dock="Top" x:Name="OpenBtn1" Label="Open" HorizontalAlignment="Left" />
<ribbon:RibbonButton DockPanel.Dock="Bottom" x:Name="OpenBtn2" Label="Open Specific File" />
</DockPanel> </ribbon:RibbonApplicationMenuItem>
|
|
|
|
|
Still no joy
When using a a preview panel (from within VS2010) the panel looks fine, but in the app the items are still centred (or just left of centre to be more accurate).
I guess there must a configuration item I am missing from the ApplicationMenu and DockPanel.
Thanks
Tony
|
|
|
|