|
Mycroft Holmes wrote: My question is whether it would be better to send the calls asych and each callback set a flag and tries to load the view which then checks a bunch of flags to see if the data load is completed.
Have each view calls its own service whenever the view is loaded.
This way, you don't do 20 calls at the same time.
|
|
|
|
|
Wat - I am talking about 1 view and a number of static tables! Of course each view has its own VM that does the calls to the WCF!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am new to SilverLight, I have created one test Application having Datagrid and Autocomplete Text box which is placed inside the datagrid,Now if the there is only one row i am able to set itemsource of the Autocomplete text box but for multiple rows how to find the control and set the itemsource?
Please help...
Thanks & Best Regards
Shwetank
modified 8-Apr-13 2:18am.
|
|
|
|
|
|
Hi,
Thanks for the reply, I have already visited the link mentioned, the thing is in that i am using WCF service to get the data from database and i have placed Autocomplete textbox Control inside the datagrid for one row i am able to find the control and add the itemsource but if there are multiple rows then how do i do that?
Thanks & Best Regards
Shwetank
|
|
|
|
|
It can be done in two ways...
if the data to be binded to AutoComplete textbox is large, bind that collection to Autocomplete box by setting the datacontext to parent element of datagrid or first control in the page(we usually use grid as the main content holder) where that datacontext holds the Autocomplete collection and bind it to AutoCompleteBox.
Here in this sample, they are binding some static resource. you can replace it with your collection and it gets binded.(Same collection gets binded to all AutoCompleteBox).
<input:AutoCompleteBox
HorizontalAlignment="Left"
Width="180"
IsTabStop="True"
Text="{Binding UserName, Mode=TwoWay}"
ItemsSource="{StaticResource SampleHeroes}"
/>
another solution is if you want different collection to be binded, you can add one more property to Users class (in this sample) which holds the collection and you can bind it directly inside AutoCompleteBox....
e.g
new Users{ UserName="Hiro Nakamura", Age=24, Gender="M", Country="Japan", AutoCompleteList = new List<string>{"Hi","Hello","Welcome","Bye" } }
But it does not seems to be good...
you can use the first approach.
|
|
|
|
|
Hi,
I tried using '' Tag but not getting....
Please find below the code i have tried...
<sdk:datagridtemplatecolumn header="Destination">
<sdk:datagridtemplatecolumn.celltemplate>
<datatemplate>
<sdk:autocompletebox height="25" name="aceDestination" verticalalignment="Top" width="175">
|
|
|
|
|
it depends on the references you are using...
you arealready using AutoCompleteBox in your app.so use the same but instead relpce its itemsource with a property name
|
|
|
|
|
Hi,
Could you please share sample code that would really help me a lot.
and one more doubt: to get the city list there is one function written in .svc class, it is returning Generic List so how to convert that to objectCollection...
Thanks & Best Regards
Shwetank
|
|
|
|
|
I have an SL 5 app that the user can drop files and directories into.
When launched from the debugger, it works as expected.
When I try to use the xap in a page on a remote site, I get a Security exception.
foreach (FileInfo fi in files)
{
// _files.Enqueue(fi);
if (fi.Attributes == FileAttributes.Directory)
Attaching the debugger to the browser, I see:
+fi.Attributes 'fi.Attributes' threw an exception of type 'System.Security.SecurityException' System.IO.FileAttributes {System.Security.SecurityException}
"File operation not permitted. Access to path '' is denied."
UPDATE: Some properties of the FileInfo object are available, but not things like Attributes, Directory, DirectoryName.
1) Why does it work when started from the debugger?
2) How can I get it working outside of the debugger?
Thanks for any insight....
modified 8-Apr-13 10:14am.
|
|
|
|
|
The OP contains the exception I see when attaching the debugger to the browser.
Certain properties of the FileInfo appear to be unavailble -- Attributes, Directory, DirectoryName -- when running outside of the browser.
|
|
|
|
|
As Colin mentioned (sort of ), this is Silverlight. It runs in a locked down sandbox environment and does not have access to local resources (files, registry, etc.). If you want to have access to those types of things, you need to specify that you want elevated permisions in your config file.
|
|
|
|
|
Thanks for the reply.
A hint on how to specify the elevated permissions would be appreciated...
(Weird: when I build and run the project -- from the debugger -- on a different computer, the app does not have elevated permission. Trying to figure out the difference between the two computers.
I have this code in a handler for the MainPage Loaded event:
Msgs.Text = string.Format("{0} ElevatedPermissions", (Application.Current.HasElevatedPermissions ? "Has" : "Does NOT have"));
)
|
|
|
|
|
My google foo is failing.
I have a treeview with a HierarchicalDataTemplate made up of a user control, in the UC I have a textbox where acceptreturn=true. When the user presses enter while editing the textbox the treeview grabs the enter key event.
How can I force the enter key press event down to the textbox?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Idiot - e.handled = false on the keydown event
private void EnterDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
e.Handled = false;
}
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The enter key only passes to the UC when there are no child nodes
Using the Telerik grid so I will go annoy them b/c I think it is control specific!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The tree view is kinda weird in that some messages get funneled up the parent nodes until it reaches the root. Some other messages are eaten by the parent nodes. Have you tried using the preview events? You can usually get those consistently... except when you can't.
|
|
|
|
|
SledgeHammer01 wrote: except when you can't
Your reply instils me such confidence! I dumped it into the telerik forum, they tend to give pretty good support if a little slow lately.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Haha... probably more of a treeview control issue since its weird with the keyboard. That's why I said what I did. Some keys work one way and other keys work a different way.
|
|
|
|
|
Are there known issues with WPF GDI with Windows XP? I have a bunch of observations of a legacy WPF application that we have only on XP but works fine with Weven and others.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
WPF is flakey on XP. Known issue.
|
|
|
|
|
WPF is fine on XP ... when there are issues, it's because of crappy graphics cards (in my experience).
WPF uses DirectX; the graphics card needs to support some minimum level of DirectX.
|
|
|
|
|
Not true. XP uses a completely different rendering mechanism then Windows 7. By default WPF on XP is software only. On Vista / Win7 its hardware accelerated.
|
|
|
|
|
|
Cool link. What's your point? Have you ever tried retrieving the rendering tier on XP?
|
|
|
|