|
Hello,
I do have these files on the root of the WCF project. And just to be sure I also put them in the root of inetpub www. But I still get the erro: "WriteableBitmap has protected content. Pixel access is not allowed."
Is it possible that these files are not being utilized?
Thanks,
Derek
|
|
|
|
|
geoderek wrote: Is it possible that these files are not being utilized?
This might be a security issue.
If you run this project with elevated permissions, it might work.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
How is it possible to stop the selectionchanged event to get fired the first time the grid is loaded with data?
|
|
|
|
|
Set up a way to eat the event during databinding?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Not sure what else to do as I have tried -= and +=
Any further thoughts please?
|
|
|
|
|
A slightly more detailed response with the same concept that JSOP offered.
Set a bool (bLoading) in the constructor of the view
in the event check for the bool setting and ignore if bLoading == true
set bLoading to false at the end of the constructor.
Caveat I do this in winforms and assume it works in SL, I have not yet needed it in SL
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That will not work because the onstructor only gets called once.
|
|
|
|
|
Then you need to locate the method that populates the grid, probably the onchange event on your list and use the same logic.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The section which populate sthe grid is in the load events.
Please look at my earlier post to see the code events I am using.
Still having t he same problems...
|
|
|
|
|
I am working on an existing silverlight 4 application.
main page is MainPage.xaml
This page has a main datagrid i.e. datagrid1 and another datagrid i.e. datagrid2 which is inside the datagrid1.
When the application is run, the datagrid1 is populated with data.
Everytime you click on a row in datagrid1, then the datagrid2 is shown and is loaded with data.
Problems is everytime the datagrid1 is loaded, i.e. when th emainpage.xaml is run, then datagrid2 gets shown in the first row of datagrid1.
How can I stop the datagrid2 being shown when the mainpage.xaml is loaded?
I think somehow I have to get the -= and += code to work. You see them above where they are commented because they do not compile.
Any thoughts please?
for datagrid1 I am using the following events with codes inside them:
private void datagrid1_Loaded(object sender, RoutedEventArgs e)
{
//this.datagrid1.SelectionChanged -= new EventHandler(this.datagrid1_SelectionChanged);
this.DataContext = ((MainPage)(Application.Current.RootVisual)).GetData;
//this.datagrid1.SelectionChanged -= new EventHandler(this.datagrid1_SelectionChanged);
}
private void datagrid1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (datagrid1.RowDetailsVisibilityMode == DataGridRowDetailsVisibilityMode.Collapsed && e.RemovedItems.Count == 1)
datagrid1.RowDetailsVisibilityMode = DataGridRowDetailsVisibilityMode.VisibleWhenSelected;
}
private void datagrid_RowDetailsVisibilityChanged(object sender, DataGridRowDetailsEventArgs e)
{
if (e.Row.DetailsVisibility == Visibility.Collapsed) return;
if (e.Row.DataContext is myservice.myData)
{
//retrieve data
}
}
Thanks
modified on Thursday, December 9, 2010 9:49 AM
|
|
|
|
|
I create in the code some image control and i want to set on this image control some of the picture that i saved ( load those pictures before creating the image control )
How can i do it ?
|
|
|
|
|
|
Hi,
I am unable to reload the designer for a .xaml page.
I get the error:
An unhandled Exception has occured.
System.InvalidOperationException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.
Further down the error message it says:
System.InvalidCastException
Unable to cast object of type 'System.Windows.Controls.Canvas' to type 'myprojectname.Silverlight.MainPage'.
Any thoughts please?
Thanks
|
|
|
|
|
let us see you xaml
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
In xaml, There is an underline on {TemplateBinding Content} in the following script:
The error is: Property 'Content' was not found in type 'Control'
Do y ou see why?
Note that I can compile but not sure why I get this underline.
Any thoughts please?
Thanks
<UserControl.Resources>
...
...
...
<ControlTemplate x:Key="ToolTipTemplate">
<Border BorderBrush="red" BorderThickness="5" CornerRadius="1" Background="blue">
<ContentPresenter Grid.Column="3"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="1,1,1,1"/>
</Border>
</ControlTemplate>
</UserControl.Resources>
|
|
|
|
|
This happens all the while to me. If this code works when you run it, you are good to go.
Just as a note, in Silverlight 4, the XAML parser has been upgraded and this is one of the effects of this upgrade.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I want to reload the same page when the user clicks on the same link again.
As said in some forums I tried NavigationService.Refresh but it says Refresh is not available in NavigationService.
Iam using Sl4.
Anyhelp will be appreciated.
Thanks
Santhosh
Santhosh
|
|
|
|
|
There are a number of ways to skin this cat. I don't know if this is best practise but one of the simpler ways is to create a static property that is a pointer to the page. If null open as normal with the constructor setting the static property. If not null then call a method within the page (ie. RefreshPage) which will do the work to refresh the page as required.
|
|
|
|
|
Thanks Robert for the reply
But how do we refresh it (I mean the code)..
Santhosh
|
|
|
|
|
Well assuming the page is already displayed, by refreshing I mean applying some UI logic, displaying/hiding/enabling/disabling controls, requesting and displaying data, that sort of thing.
|
|
|
|
|
I am in th eprocess of changing a silverlight 3 application to silverlight 4.
Is it necessary to check the references in the silverlight app. so that if any refers to version 3 then change to version 4 references?
Thanks
|
|
|
|
|
arkiboys wrote: silverlight app. so that if any refers to version 3 then change to version 4 references?
Yes. Else those items will still be pointing to Silverlight 3 and your code will propably not build somewhere.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
|
You can always 'mark the answer as accepted'.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi,
I am running a silverlight 4 application which is using web services.
The folowing error occurs when trying to create an instance of the web service.
Can you see why this is occuring please?
Error:
xxxServiceClient _xxClient = new xxxServiceClient();
The invocation of the constructor on type 'xx.xxx.Silverlight.xxxx.somename.somenameData' that matches the specified binding constraints threw an exception. [Line: 13 Position: 41]
Any thought please?
Thanks
|
|
|
|