c# 4.0 - How to Add List Of Project Task Details To The 'net.sf.mpxj.Task task' In C#

i have a c# object having ProjectInfo With ProjectTasks, now how can i add these projectTasks to the 'net.sf.mpxj.Task task' In C#while i am creating new object for net.sf.mpxj.Task, then it is showing error that 'the type net.sf.mpxj.Task has no constructors defined', so it cannot create new object, then how can i add projectTasks.Below is the sample Code that it does not work: List<net.sf.mpxj.Task> tasks=new List<net.sf.mpxj.Task>(); foreach (var pTask in projectInfo.ProjectTasks) { net.sf...Read more

c# 4.0 - Creating SAML 2.0 Response with C# and .NET 4.5 in IDP Initiated web SSO

I am doing web sso integration (IDP initiated flow) for our web app(a CRM portal) in which users log in with AD credentials and accesses resources on a Service Provider(SP) by passing in our customer details.Our server is on windows 2012 R2(ADFS 3.0).Can I have the SP post the SAML request to a web api (4.6,C#) ,create the SAML 2.0 Response using third party assemblies(ComponentSpace) and send it to the SP after digitally signing and Encrypting the assertion rather than relying on ADFS 3.0 to generate the SAML 2.0 Response?.Our SP wants some...Read more

c# 4.0 - multiple selection on custom picker C# UWP

I've been looking on forums and internet about a custom picker on C#, I have a picker already functional, but some of my research throw me that you are only able to select 1 item of the custom Picker, this is the code im using to deploy the picker.Picker<custom:CustomPicker x:Name="pickerCategories" ItemsSource="{Binding listCategoriesName}" SelectedIndex="{Binding SelectedCategory}" SelectedIndexChanged="pickerCategories_SelectedIndexChanged" Grid.Column="1" BackgroundColor="White"/>the item source are given to the picker as a list of ob...Read more

c# 4.0 - Is it possible to combine an ImageBrush with a LinearGradientBrush in UWP

I'm building a Planning Poker UWP app for fun. I can style the poker cards (currently implemented as Buttons, via the Background property) using either an ImageBrush or a LinearGradientBrush without any issue, but obviously I can only set one type of brush to that property.I'd like to style the card with an image, which then had another brush (e.g. a LinearGradientBrush) over-layed on top, this other brush would naturally have some degree of transparency so that parts of the image could show through.How would you do that?For the actual poker c...Read more

c# 4.0 - Convert BitmapImage into Base64String in WinRT

I want to convert BitmapImage into base64string in my windows 8.1 apps.CODE: protected void UpdateSignatureAsync(BitmapImage bitmapImage, string fileName, long vehicleInsRecID){ WriteableBitmap writimage = new WriteableBitmap(bitmapImage.PixelWidth, bitmapImage.PixelHeight); using (MemoryStream ms = new MemoryStream()) { WriteableBitmapExtensions.FromStream(writimage, ms); Stream s1 = writimage.PixelBuffer.AsStream(); s1.CopyTo(ms); writimage.PixelBuffer.AsStream(); var ic = new ImageCapture { ...Read more

c# 4.0 - How to partial fill the rectangle within canvas in xaml

I have some coordinates position on which I have to show the clickable button. SO inside button i created rectangle and everything is working as expected but now I have to show partially filled rectangle inside somewhat like rectangle bottom border.Below is the code :<StackPanel> <Button Width="{Binding width}" Height="{Binding height}" ToolTipService.ToolTip="{Binding name}" Command="{Binding DataContext.EventTriggerCommand, ElementName=XYZCOORD}" CommandParameter="{Binding}"> ...Read more

c# 4.0 - When I deploy windows store app, I want a file to be placed at ApplicationData.Current.LocalFolder. How to?

When I deploy windows store app, I want a file to be placed at ApplicationData.Current.LocalFolder so that I can read that file from ApplicationData.Current.LocalFolder.How to do it?The problem actually is that I place my file at ApplicationData.Current.LocalFolder, I know where this file is located in my computer. Then I read from this location in my app. But when I upload this to windows store, the app cannot find the file at: ApplicationData.Current.LocalFolder. Please please please help me with this!!!...Read more

c# 4.0 - XAudio2 Source/Master Voice SetVolume parameters

I'm trying to build a volume slider for my WPF app to apply to the WAV files I'm outputting via XAudio2.I've got it all string together and can play sounds. Great!I just can't make sense of the argument for the SetVolume method.Can anyone explain what the appropriate values for a volume slider?I'm sure I am missing something incredibly obvious and I;m just not used to playing with audio files so I'm pretty clueless to boot.I expect I'd really want to end up with two sliders, one for the mastering voice and one for the source voice....Read more

c# 4.0 - VisualBrush makes Visual blurred

i have a problem with the WPF VisualBrush. Here you find two images from my application. The bigger on is a image which shows a control with text. The smaller one is a extract from the first on who i use a visual brush to make it. My problem is, that when the resolution of my Visual (the content for VisualBrush) would be smaller then the visual brush looks more blurred. I don't no why. I use the following code to declare the visual brush. var blendBrush = new VisualBrush { Visual = Host.Viewer, TileMode = TileMode.N...Read more

c# 4.0 - ScrollViewer issues with multiple panels on same page

In my application I have different pages and each page loads into frame of main application Page.Now Each page has two StackPanels named left and right. left panels plays role of side bar and should not scroll with all page so I wrapped only right StackPanel into ... and right part works fine. but when I do this and run my app left panel stops responding and I can't even click on its child controls like text box...<Grid> <StackPanel Orientation="Vertical" Width="230"> <Label Content="write message"/> <RichT...Read more

c# 4.0 - Observable collection - CollectionChanged Binding

During programming, I ran into the following questions:Does a observable collection implement a CollectionChanged event by itself? (Because of differentbooks refering to the fact that it does, but google shows otherwise)I have the following code, and I want my UI to update by binding (the code is for windowsPhone 7.1) Also, the binding works for single items in my observable collection, but when I try to add a new object to my collection, the CollectionChanged event doesn't fire.namespace Phone.lib.ViewModel{ public class DeviceViewModel : V...Read more