|
Sounds like a fair bit of work, but it's definitely doable. You want it to fill like a clock ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Not like a clock..just want edge to change color and become thicker..or some other efect. Center of the circle is not filled with any color..it is just transparent.
|
|
|
|
|
OK, but the filled area moves around the circle ? I think there are circular sliders already about on the web, sounds like a good starting point to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes..filed area represents sound volume for example. When it is 100% then it is full circle and when it is 50% then it is only half of the circle edge filled with color and the other half circle edge is emty or in another color.
|
|
|
|
|
Hi,
I am working on a silverlight project. In this I have a media element in silvelight usercontrol. I am using this user control in MainPage.xaml. In the user control I have a button the media element should be fullscreened and then if I click Escape it should return to its original size.
If anyone have any idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
|
Whenever I call my SSL enabled webservice I get this message:
An error occurred while trying to make a request to URI 'https://XXXX.com/XXXX.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
This service works with no crossdomain issues without SSL. I followed some online guide to enable SSL, which is to add a few lines in crossdomain policy file:
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
<domain uri="https://*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
Changing the web.config file:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SSLEnabled" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="XXXX.Web.XXXX">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="XXXX.Web.XXXXBehavior" name="XXXX.Web.XXXX">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="SSLEnabled" contract="XXXX.Web.XXXX" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
The host I am working on has multiple domain name so I had to add the following code in the WCF service:
Public Class XXXXHostFactory
Inherits ServiceHostFactory
Public Overrides Function CreateServiceHost(ByVal constructorString As String, ByVal baseAddresses() As System.Uri) As System.ServiceModel.ServiceHostBase
Return MyBase.CreateServiceHost(constructorString, baseAddresses)
End Function
Protected Overrides Function CreateServiceHost(ByVal serviceType As System.Type, ByVal baseAddresses() As System.Uri) As System.ServiceModel.ServiceHost
Dim webServiceAddress = New Uri("https://XXXX.com/XXXX.svc")
Dim webServiceHost = New MyServiceHost(serviceType, webServiceAddress)
Return webServiceHost
End Function
Public Class MyServiceHost
Inherits ServiceHost
Public Sub New(ByVal serviceType As Type, ByVal baseAddresses As Uri)
Dim BaseAddressScheme As New UriSchemeKeyedCollection
BaseAddressScheme.Add(baseAddresses)
MyBase.InitializeDescription(serviceType, BaseAddressScheme)
End Sub
Protected Overrides Sub ApplyConfiguration()
MyBase.ApplyConfiguration()
End Sub
Protected Overrides Sub InitializeRuntime()
MyBase.InitializeRuntime()
End Sub
End Class
End Class
And change the markup of the WCF to:
<%@ ServiceHost Language="VB" Debug="true" Service="XXXX.Web.XXXX" Factory="XXXX.Web.XXXXHostFactory" CodeBehind="XXXX.svc.vb" %>
Everything works perfect without SSL, but I added another service for authentication - which requires SSL and made the changes to the code shown above, and I get the crossdomain error.
What else did I miss?
|
|
|
|
|
Hi there,
I was getting the same message with an SSL enabled service recently. It turned out that the name on the certificate in IIS was slightly different than what I had in the WCF binding (I was missing a "companyname.co.nz" on my binding). It didn't really matter without SSL because it was all running locally so the machine-name (without the "companyname.co.nz") was enough.
Something for you to double check anyway.
Cheers.
|
|
|
|
|
Thank you, it turns out everything was set up fine, but the Certificate itself was wrong. The host has fixed it and now the SSL service work fine.
|
|
|
|
|
Also, if you're hosting on IIS, make sure there's an HTTPS binding on the site.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
OK, here is the scenario. Take a selector (any type of list item that you can select values) and bind it to an observable collection. Let's say that collection is populated from a service call.
The issue is that you bind, the collection is empty, so there is no selected index. You cannot plug into the Loaded event on the box because if you try to set selectedindex = 0, and the collection hasn't loaded yet, you're out of luck.
In the code behind I can wire into the collectionchanged and then set selectedindex = 0 but that seems a little contrived.
I have a full solution using attached properties but it seems overly complicated for the behavior (I want to always default to the first item in a collection when the collection becomes available).
Anyone have a similiar scenario and thoughts about a solution?
One thing I looked at was having the view model raise a "collection loaded" event, but then again the view will have to hook into that in the code behind.
My attached properties solution basically creates a list of weak references between the selectors and the collections, then hooks into the collection changed event. When it fires, it finds the selector it is linked to and then sets the selected index. It works like a charm but I want to make sure I'm not overcomplicating it when there may be some setting that says, "Default to the first item" when a collection gets filled.
Thanks,
Jeremy
|
|
|
|
|
Hi Jeremy,
One way could be to have a property in the ViewModel like this:
private int _selectedIndex = -1;
public int SelectedIndex
{
get { return _selectedIndex; }
set
{
if (value != _selectedIndex)
{
_selectedIndex = value;
NotifyPropertyChanged("SelectedIndex");
}
}
}
It's set to -1 initially so the XAML doesn't throw an error when there's no collection to bind to.
Bind it to the list box:
<ListBox ItemsSource="{Binding Employees}" SelectedIndex="{Binding SelectedIndex}" />
Then, in the completed event (when the service returns from the asynchronous call with the data) you can set it to whatever you want.
void svcClient_GetDataCompleted(object sender, EmployeeSvc.GetDataCompletedEventArgs e)
{
Employees = e.Result;
SelectedIndex = 1;
}
Not particularly elegant, but it seems to work.
Cheers.
|
|
|
|
|
My data has many columns but a few rows. I need to “rotate” the display with the DataGrid. I wish the DataGrid could display rows as columns, and columns as rows. Is it possible?
|
|
|
|
|
I don't think the datagrid does any transposing at the moment.
This[^] blog post shows a way of transposing your data instead.
Hope that helps.
|
|
|
|
|
hi friends,
i am using a datagrid for my application, i have a combos box in which i am populating data frm a class ie i am using cellEditingTemplate <combobox itemsource="{Binding" theclassname.listused}="" selecteditem="ListUseddataId"> etc i am not able to populate data in the combobox.. how can i debug a combodox data if it is used as data template?
Thanks in Advance...
Regards
Samir
|
|
|
|
|
VCsamir wrote: i am not able to populate data in the combobox
How are you trying to populate the combobox?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I m working on a windows project . i m new in WPF. so my question is can we use wpf controls and graphics in my existing windows project....tell me sum link for tutorial to if this is possible
|
|
|
|
|
Do you mean that you want to host WPF controls inside a WinForms application? Why not write the whole application in WPF?
If you do mean hosting inside WinForms, you might want to follow the tutorial here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I dont want to change the whole application. I want to apply WPF graphics on some of my pages.
IS its possible???????????
|
|
|
|
|
You can probably embed a WPF window here and there, but I think it's a dumb idea. You'd do better to start with WPF, embed your winforms controls as needed, and do the rest with WPF.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
anuj1784 wrote: IS its possible???????????
Did you even look at the link I included in my post?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
ohh sorry i thought u not understand wat i m tring to say
|
|
|
|
|
Hi,
I am developing a wpf application, with which I need to develop a user control,
but for now I am trying to achieve that functinality on one of my WPF forms first.
All I needed is picture(thumbnail size) list on the left side(vertically) of the form, and should able to manually scroll though the list
I am using Grid -> button(UP) in first row, button(DOWN) in third row ->
scroll viewer in middle row -> listbox(within the scroll viewer) -> individul images in the listbox
My main goal is to animate the imagelist vertically on clicking up or down button accordingly,
Now I almost got this simple functionality by setting scrollviewer's contentverticaloffset property,
but it's not smooth, it does not animate but just move up and down. Is there anyway I can animate this list smoothly?
I hope the problem makes sense, I am kind of new to WPF.
Thanks
|
|
|
|
|
grvdarji wrote: listbox(within the scroll viewer)
A listbox by default already has a scrollviewer wrapping its items presenter.
Do you just need to scroll through the images or do you also
need to be able to select images?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for the reply, Mark
Actually, the moment I clik on any image in listbox, the big image of the same, should show up in right hand side big image control.
So in order to answer your que.
No it is not just scrolling but I should be able to select and use that image-ID as well.(So it has to be a button at the top and bottom of listbox for manual scrolling since I don't want default scrolling, also I should not click(pick) and move image for scrolling.)
Just FYI: the thumbnail and big image are diff. image and coming from MS access 2007 DB.
Sorry for less info. in first time.
|
|
|
|