|
Have you got the service URL correctly confugured?
Check the config file.
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.
|
|
|
|
|
Which config file do you mean?
web.config in the WCF ?
How do I know it is properly configured?
Thanks
|
|
|
|
|
No the config file on the client side - serviceclient.config.
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.
|
|
|
|
|
One tool I always find useful in diagnosing any network application, is wireshark.
With this, you can see what exactly the client is asking for, and what exactly is being returned...
Once you know whats going on 'over the wire' you can work back through your code & configuration to figure out what the problem is...
|
|
|
|
|
I have an expander control that contains search fields, the idea being that when the user wants to filter records they press the filter button the expander control lightboxes the screen so the user can choose from drop downs and then press search. When the user presses the search button, I want the expander to collapse, this is about what it all looks like:
XAML for expander:
<Expander
HorizontalAlignment="Left"
ExpandDirection="Right"
IsExpanded="{Binding IsExpanded, Mode=OneWay}"
Style="{StaticResource sbExpander}">
Viewmodel:
public bool IsExpanded { get; private set; }
private void Search()
{
...<other code is here>
IsExpanded = false;
OnPropertyChanged("IsExpanded");
}
Is there any reason this should not work? On the loading of the window the IsExpanded = false works correctly, but the search triggering the IsExpanded = false does not work. Thoughts?
Cheers and Merry Christmas, --EA
|
|
|
|
|
Generally, the way you would set this up to ensure that the binding ALWAYS stays synchronized, would be a TwoWay binding with a property like this:
private bool _isExpanded = false;
public bool IsExpanded {
get { return _isExpanded; }
set { _isExpanded = value; OnPropertyChanged("IsExpanded"); }
}
The underscore prefix is just how I usually do private variables... And if you want it to be more efficient, you can have the setter first make sure the value is actually changing...
But anyway, if you set up the property like that, you really never have to worry about, say, forgetting to do an OnPropertyChanged notification.
That said, I don't see anything wrong in the code you posted, from a functionality standpoint. The problem might be elsewhere. If you're replacing the template in sbExpander, that might be a potential trouble spot.
|
|
|
|
|
Thank you. I was trying to take a shortcut in the declaration of the public IsExpanded property. By not using a backing property and using private set, I disallowed the two way binding.
I fixed it as per your suggestion:
XAML:
<Expander
HorizontalAlignment="Left"
ExpandDirection="Right"
IsExpanded="{Binding IsExpanded}"
Style="{StaticResource sbExpander}">
ViewModel:
public bool IsExpanded
{
get { return _isExpanded; }
set
{
if (value == _isExpanded)
return;
_isExpanded = value;
OnPropertyChanged("IsExpanded");
}
}
Thanks for the insight.
Cheers, --EA
|
|
|
|
|
I would like to use the navigation controls that utilize the journal history of pages that are navigated to. I know normally I have to have the page navigated to first to enable the forward arrow because it needs a history or journal entry. Is it possible to load four pages at start-up so you can use the forward navigation button without actually navigating to those pages? The reason for this is I would like to not have to create additional buttons for forward or back navigation.
My uses are a WPF wizard using PageFunctions as each page. The start-up class is of type NavigationWindow but always displays page 1 after start up. In other words there is no "launching" dialog as is found in many WPF wizard uses..
Thanks in advance.
|
|
|
|
|
I am using <navigation:Page for my silverlight pages.
Where do I place the resources on this page?
I have used usercontrols before and used to place the <usercontrol.Resources> inside the usercontrol page.
But not sure where to place the resources if I use navigation pages. These navigation pages are created using silverlight page items in silverlight 4
Any thoughts please?
thanks
|
|
|
|
|
Hhi,
In the following xaml, you see that I am showing the Address field when a row of datagrid is clicked on.
Question:
I have a datagrid2 which I would like to be placed instead of the Address field.
At present I am using the event:
datagrid1_RowDetailsVisibilityChanged to populate datagrid2 for the selected row in datagrid1
How do I replace the address field with the datagrid2 please? Can I place something like <datagrid2></datagrid2> instead of the <TextBlock Text="{}"... ?
Thanks
<data:DataGrid.RowDetailsTemplate>
<DataTemplate>
<Border>
<Border>
<TextBlock Text="{Binding Address}" TextWrapping="Wrap"></TextBlock>
</Border>
</Border>
</DataTemplate>
</data:DataGrid.RowDetailsTemplate>
|
|
|
|
|
This[^] may help.
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.
|
|
|
|
|
Not sure what you are referring to.
Please explain.
|
|
|
|
|
Are you not looking for a datagrid within a datagrid?
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.
|
|
|
|
|
|
If not, then I have misunderstood your question.
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.
|
|
|
|
|
If I have a dynamically created OdbcDataReader, how do I hook it to the ListView in order to display the contents?
I already have the columns defined, and I just want to display the records from the data reader.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I figured it out:
Set the ListView.ItemsSource to the DataReader, and in XAML, set the Binding Path property of each column to its associated database field name.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Richard Andrew x64 wrote: Set the ListView.ItemsSource to the DataReader
I would consider this dangerous as the data reader locks the connection to the database while it is in scope, therefore you should move your data to an List<> of objects and bind that list to the xaml.
Your UI should be separated from your database object.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks, I changed it to be just as you said.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hello,
I have a silverlight application which is hosted within a WCF for purposes of getting at the data access layer. I am trying to convert a UI element on the silverlight side to an image using WriteableBitmap. However whenever I hit .pixels I get a protected error. Most of my research is telling me that this is a cross domain issue, but the WCF is hosted within the WCF and shouldn't that mean they are on the same domain.
Thanks so much for any feed back you can give.
Thanks,
Derek
|
|
|
|
|
You will need the client access policy or crossdomain file.
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.
|
|
|
|
|
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
|
|
|
|