Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all 18858 articles
Browse latest View live

Need Some Clarity

$
0
0

Hi,

Over the past few weeks I have been learning WPF and messing around inside of Visual Studio writing XAML.

I have some questions as I am struggling to understand a few concepts, first I will explain my goal/objective.

I am looking to create a simple prototype user interface with all the generic offerings a usual user interface has. The prototype UI is for a game engine and I am only working on the prototype for the UI and not the actual tools or rendering technology. I have a list of things that I want to create for the user interface such as, top level menu (file, edit, etc). A custom caption bar (game engine's logo, minimize, maximize, shutdown buttons, etc.)

Here is a mock up I have create:

Now that I have explained my objective I will continue on with the questions :D

I am looking to create all the elements you can see in that above screenshot, I am pretty new with XAML but I do have experience with HTML and CSS and feel pretty comfortable with XAML.

I would like to ask about Control Templates as I have read over and over on MSDN about them and feel that I am not understanding the concept properly. I thought that a Control Template when used in a Style simply allows you access to a controls properties to give you the ability to change the look and feel of a control but still maintain it's core functionality. I must be missing something because each and every time I create a Control Template for a control it seems that I have to start from scratch and add all the elements that make that specific control functional.

I have been creating a Menu with MenuItem's using a Control Template in a Style which is in a Resource Dictionary and the Menu and MenuItem's do not work the way I would expect them to work and I keep getting advice on the forums about things I've missed out in my Control Template which is the reason my control isn't working. I don't really want to modify that deeply, all I want to be able to do is modify the Style of a control, things like the corner radius of a button, what color that button is, what color it changes to when you hover or click on it, same thing for a menu and the menu item's. The only complicated aspects to my user interface is the dockable windows you see in the mockup. I want the user to have the ability drag those and drop them around certain points of the screen and have the window stretch and scale to give a preview of what it would look like if the user did release the mouse and drop the window in that position (very similar if not exactly the same as how draggable windows work in Unreal Engine 4).

Firstly though I would like to get a better understanding on Control Templates and Styles, I have read the information available here on MSDN but when it comes to practically doing it I seem to be misunderstanding something. I want to be able to fully modify the look of a control but keep the functionality without having to add all the ItemPresenters or ContentPresenters or anything like that, if that is the only way to do though then I guess I have a lot of learning to do but, it would be great to have some clear direction on what I should be learning to achieve my objective.



WPF listbox item event

$
0
0

Hello,

I am back :)

so, now I have the listbox populated and have it binding to a List collection, wondering how I would go about adding an event, if a user clicks on one of the items in the list box, open this, or if they user clicks on another, then do something else etc., any ideas?

XAML of the listbox:

<ListBox x:Name="listBox" HorizontalAlignment="Left" Height="313" Margin="43,45,0,0" VerticalAlignment="Top" Width="298" Grid.Column="1" FontFamily="Times New Roman" Background="White"><ListBox.ItemTemplate><DataTemplate><TextBlock Text="{Binding}" /></DataTemplate></ListBox.ItemTemplate></ListBox>

C# code:

 private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

thanks in advance :)

Populate data in DataGrid Row Template

$
0
0

I have a GridView. Each Row in the Grid View Can be expanded to see the details. When the Summary grid opens all the rows are expanded to show the details. Each detail element is a Grid. On expanding the row there is a code behind to populate the Data in each detail grid.  The Item source for the detail grid is a List. But I can only see the last element in the list is populated in each detail grid.

<usercontrol:MyRadGridView VirtualizingStackPanel.IsVirtualizing="True"
                                     VirtualizingStackPanel.VirtualizationMode="Standard"

                                     x:Name="MySummaryViewGrid" AutoGenerateColumns="False"
                                     ItemsSource="{Binding MyResults.DataView}"
                                     GridColumns="{Binding MyResults.MyColumns}"
                                     EnableRowVirtualization="False"
                                     RowDetailsVisibilityMode="Visible"
                                     RowDetailsVisibilityChanged="MyGrid_RowDetailsVisibilityChanged"><usercontrol:MyRadGridView.Columns><telerik:GridViewToggleRowDetailsColumn Tag="Permanent"  ExpandMode="Multiple"/></usercontrol:MyRadGridView.Columns><usercontrol:MyRadGridView.RowDetailsTemplate><DataTemplate><Border><usercontrol:MyRadGridView Margin="26,3,3,3" x:Name="MyGrid_Detail" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}, Path=DataContext.MyDetailsList}"
                        IsSummary="True"
                        ItemsSource="{Binding MyDetailsList, Path=DataView}"
                        ShowColumnHeaders="False"
                        ShowGroupPanel ="False"
                        GridColumns="{Binding MyColumns}"></usercontrol:MyRadGridView></Border></DataTemplate></usercontrol:MyRadGridView.RowDetailsTemplate>

code behind:

private void MyGrid_RowDetailsVisibilityChangedFixed(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
        {
            var drCurrentRow = e.Row;
            var drView = drCurrentRow.Item as DataRowView;

            if (e.Visibility == Visibility.Visible)
                ViewModel.FilterDeatils();

        }

Filter Method in View Model:

public void FilterDeatils()
        {
            try
            {
                var dt = _detailDataTable.AsEnumerable().Where(p => p.Field<string>("p1") == MyValues_1).Where(p => p.Field<string>("p2") == MyValues_2)
                                                                                                  .CopyToDataTable();
                var detailResult = new ListingResult("") { Data = dt };


                detailResult.MyColumns = _detailColumns;

                MyDetailsList.Add(detailResult);

            }
            catch (Exception)
            {


            }

        }



Is there any scenario when calling InvalidateMeasure, it does not trigger MeasureOverride method?

$
0
0
I have a custom control implemented.
When i call InvalidateMeasure to one of its UIElement; its MeasureOverride is not triggered.
Also, during this state, when width or height is changed MeasureOverride is not triggered.
MeasureOverride is triggered in almost in all the cases. But, there is specific scenario it is not getting triggered.

It is not possible for me to replicate the same issue in a simple demo, also i cannot share the custom control too.

Current workaround, is to invalidate one of UIElement's Nested Parent element (only once), and the measure override is triggered there after. But later when using the application the same issue occur again.

So, is this a bug in WPF framework?
is there any scenario that stops the WPF framework calling MesureOverride, when InvalidateMeasure is called?

Some observations:
In the following visual structure.
As is stated earlier, if i invalidate 'Node' it is not working.
workaround: If i invalidate CustomScrollViewer (only once), it is working.
Clue: if i remove Annotations i cant see this problem ever.

Visual structure will be like this:

Control (a custom control)
-Grid
--CustomScrollViewer (a custom control)
---Border
----Grid
-----ContentPresenter
------Canvas
-------DiagramPage (a custom panel contains about 200 elements)
--------Node (a custom control)
---------Grid
----------AnnotationPanel (a custom panel contains about 2-3 elements)
-----------Annotation


- Jegan









WPF TextBox and multilingualism

$
0
0

Hello everyone!

I have a little problem with the multilingualism of
Text boxes, I want the text in different languages
Can be entered. But the text may not have any
Resourc-Files run.

Does anyone have an idea how I can change this at runtime?
Maybe just a button?
Button1 = "English"
Button2 = "German"
Button3 = "France"

Best Regards

Bernd

Style Resource with StaticResource template not setting opacity

$
0
0

So I've got a menu that uses  a menu style.

<!--Begin Utility Buttons--><Menu x:Uid="menuUtilityButtons" Background="Transparent"  HorizontalAlignment="Left"><Menu.CommandBindings><CommandBinding  Command="{StaticResource ExecuteLegacyAction}" CanExecute="CommandBinding_CanExecute"
                                 Executed="ExecuteLegacyAction_Executed"/><CommandBinding  Command="{StaticResource ExecuteAction}" CanExecute="CommandBinding_CanExecute"
                                 Executed="ExecuteAction_Executed"/></Menu.CommandBindings><MenuItem x:Uid="menuItemUtilityButtons"  Style="{StaticResource MenuItemButtonContextMenuStyle}"  Background="Transparent" ToolTip="Configuration and Utilities"><MenuItem x:Uid="menuItemCutoffInEffect" Command="{StaticResource ExecuteLegacyAction}" CommandParameter="{StaticResource CutOffInEffect}"
                          IsEnabled="false" ><MenuItem.Header><TextBlock x:Uid="textBlockCutoffInEffect" Text="Cutoff in Effect" VerticalAlignment="Center"/></MenuItem.Header></MenuItem>

So I'm using the StaticResource MenuItemButtonContextMenuStyle for styling.

if you look at the style it has a StaticResource for a template TopLevelHeaderTemplateKey

<!--Menu Item Style--><Style x:Key="StandardMenuItemStyle" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource BaseControlStyle}"/><Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource BaseControlStyle}"/><Style x:Key="MenuItemButtonContextMenuStyle" TargetType="{x:Type MenuItem}" BasedOn="{StaticResource StandardMenuItemStyle}"><Style.Triggers><Trigger Property="Role" Value="TopLevelHeader"><Setter Property="Template" Value="{StaticResource TopLevelHeaderTemplateKey}"/></Trigger></Style.Triggers></Style><!-- TopLevelHeader --><ControlTemplate x:Key="TopLevelHeaderTemplateKey" TargetType="{x:Type MenuItem}"><Grid><Grid><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="48" SharedSizeGroup="MenuItemIconColumnGroup"/></Grid.ColumnDefinitions><ContentPresenter x:Name="Icon" Margin="0"  VerticalAlignment="Center" ContentSource="Icon" /><Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False"
                       PopupAnimation="Fade"><Border Name="SubmenuBorder" SnapsToDevicePixels="True" Background="{StaticResource WindowBackgroundBrush}"
                        BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1" ><StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" /></Border></Popup></Grid></Grid></Grid><ControlTemplate.Triggers><Trigger Property="IsSuspendingPopupAnimation" Value="true"><Setter TargetName="Popup" Property="PopupAnimation" Value="None"/></Trigger><Trigger Property="IsEnabled" Value="False"><Setter Property="Opacity" Value=".25"/></Trigger><Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True"><Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4"/><Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3"/></Trigger></ControlTemplate.Triggers></ControlTemplate>

The problem is when the menu IsEnabled=false the opacity should be set to .25 however, this is not happening.

I did create a different topic on this because of a change in the default template between Windows7 and Windows8.

But I am using a different template so it should work right?

If I add "Template="{StaticResource  SubmenuItemTemplateKey}""  to the menu item it works fine however, I don't want to add this to every menu item.

If I add that same thing to the top most menu it errors out. I would assume that's because I have Style="{StaticResource MenuItemButtonContextMenuStyle}" which has the embedded template style in it.

Any suggestions would be appreciated.

Thanx 

XBAP appcrash PresentationHost.exe with Fault Module Name: clr.dll 4.0.30319.34209

$
0
0

Hi,

I have an xbap app and when I try to run the deployed version on my laptop it crashes every time. I am able to run this xbap from other systems without issue, so I know that the application is fine. I can also run other xbap applications from my laptop without issue. It is just one particular app that crashes everytime...unfortunately it's the app that i'm the developer on and I need to be able to run it!

I am running Windows 8/.Net 4.5.2

I have tried uninstalling/reinstalling .Net, uninstalling/reinstalling VS2013/checking permissions on my system/pretty much every other advice from the support articles that I could find. Nothing so far has resolved the issue.

here is the error when the app crashes:

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: PresentationHost.exe
  Application Version: 6.3.9600.16384
  Application Timestamp: 521582ce
  Fault Module Name: clr.dll
  Fault Module Version: 4.0.30319.34209
  Fault Module Timestamp: 5348961e
  Exception Code: c00000fd
  Exception Offset: 000020d1 or 00001e82
  OS Version: 6.3.9600.2.0.0.256.4
  Locale ID: 1033
  Additional Information 1: 7b00
  Additional Information 2: 7b00d64d11e33cade90d3130b43b071f
  Additional Information 3: 5f29
  Additional Information 4: 5f299f211e1d98e0a704789ec95825a1 

From Event Viewer:

Faulting application name: PresentationHost.exe, version: 6.3.9600.16384, time stamp: 0x521582ce
Faulting module name: clr.dll, version: 4.0.30319.34209, time stamp: 0x5348961e
Exception code: 0xc00000fd
Fault offset: 0x000020d1
Faulting process id: 0x1dd4
Faulting application start time: 0x01d14fc9d1352995
Faulting application path: C:\Windows\SysWOW64\PresentationHost.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: 1d380208-bbbd-11e5-8266-dc4a3e030f14
Faulting package full name:
Faulting package-relative application ID:

I ran SFC to check my system and found 1 file corrupted which it repaired:

Repairing corrupted file [ml:520{260},l:46{23}]"\??\C:\windows\System32"\[l:24{12}]"invagent.dll" from store

I then ran a chkdsk on the next reboot and it did not find any issues.

I have cleared my cache, deleted all the app files from the user\AppData\Apps, user\AppData\Local\<apppath> and still have this same crash when I run this xbap.

Please help resolve this issue.

Thanks,

Christine

Ischecked loading problem

$
0
0
Hey. I have a little problem. I have a checkbox that is checked but i have set the properties so that it should be ischecked = false.
then i also have a setting that saves the state of the checkbox when you close the program.

But when i close the program and have the checkbox unchecked it still loads as checked.



Draggable Docking Panels

$
0
0

Hi,

I am looking to create draggable windows that work in the following way:

UE4 GIF

You can see that you can grab the tab of the panel and drag it around and notice that you have a kind of wireframe showing where you can drop the window and the panel you are dragging conforms to the space it will take.

I am looking to create the exact functionality inside WPF.

My mockup of my panels are here: 

I have a very rough idea to make this happen. Using a UniformGrid and adding my row and columns for my panels but I am wondering what object to use to make the actual panels where you have the tab and the panel like in my reference.

A Grid with a StackPanel?

Any advice on how to achieve this or even a nudge in the right direction would be very much appreciated! 


VisualStateManager problem (?)

$
0
0

I hope this is the right place for this...

I have a simple WPF application and needs to change (disable) multiple controls while waiting for external data.

I have used Blend to design the Visual State Groups and Blend shows this as expected, in the preview.

Afterwards I try to use the states from code, but nothing happens - VisualStateManager.GoToState(...) just returnsfalse - no errors, no effect.

The stategroups are defined in the root grid of the page.

Any ideas to why this works in Blend, and not in  code? 

Preventing WPF form submit on pressing Enter key

$
0
0

Hello,

I've a C#/WPF XAML screen having multiple controls...textboxes, comboboxes, buttons etc.

I've kept IsDefault="True" for one of the buttons.Due to this, if user presses Enter key in any of the textboxes, the form is getting submitted.

I need to submit the form using Enter key only for one specific textbox...if user presses Enter key in any of the other textboxes,I dont want the form to be submitted. I know I can achieve this using code-behind(xaml.cs).But need to know how do I achieve this using MVVM design pattern please?

Thanks in advance.

How to change WPF DataGrid Cell BackGround Color Programmatically using C#

$
0
0

Hi,

    I have DataRowView Object from DataGrid

    Please help me to Convert DataRowView Object toDataGridRow object for changing the cell background

Any other way to get DataGridCell object or DataGridRow object fromDataRowView or DataGrid and (without using SelectedItem object)

Thanks in advance

WPF Crashing when launching Xbap

$
0
0

Hello, I am using a server service called NICE and to access the control console it launches through an .xbap extension however when I click on the link it opens up and causes an infinite download loop. Looking at the task manager I can see it's crashing WPF;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fault bucket 108368187578, type 1
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: PresentationHost.exe
P2: 6.3.9600.16384
P3: 521582ce
P4: KERNELBASE.dll
P5: 6.3.9600.18340
P6: 5736541b
P7: 0000002a
P8: 00014878
P9:
P10:

Attached files:
C:\Users\NAME.IPAYMENT\AppData\Local\Temp\WER1088.tmp.WERInternalMetadata.xml

These files may be available here:
C:\Users\NAME.IPAYMENT\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_PresentationHost_b6e8a76bb9f9fe142cdc29a38d249c5e6d9eadd_9c6ed773_108112f9

Analysis symbol:
Rechecking for solution: 0
Report Id: 9cd14bc0-ad02-11e6-82ff-c0335e0bf410
Report Status: 0
Hashed bucket: 4f3d00ce570d5b76c9174e57defd7cfd

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So I followed where is says the file may be available and found something titled report.wer which reads;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version=1
EventType=APPCRASH
EventTime=131207730701494443
ReportType=2
Consent=1
UploadTime=131207730710880170
ReportIdentifier=a1d7475d-90af-11e6-82ed-c0335e0bf410
IntegratorReportIdentifier=a1d7475c-90af-11e6-82ed-c0335e0bf410
WOW64=1
NsAppName=PresentationHost.exe
Response.BucketId=51119fe976fd3c18e83e543659552b2e
Response.BucketTable=1
Response.LegacyBucketId=108113649574
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=PresentationHost.exe
Sig[1].Name=Application Version
Sig[1].Value=6.3.9600.16384
Sig[2].Name=Application Timestamp
Sig[2].Value=521582ce
Sig[3].Name=Fault Module Name
Sig[3].Value=KERNELBASE.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=6.3.9600.18264
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=56e1b34d
Sig[6].Name=Exception Code
Sig[6].Value=0000002a
Sig[7].Name=Exception Offset
Sig[7].Value=00015b68
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.3.9600.2.0.0.256.4
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=23ce
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=23cecd99d77a6d68f6df37a880ae25b2
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=29f1
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=29f1fc6602015265ad6999e8c450d2d4
UI[2]=C:\Windows\SysWOW64\PresentationHost.exe
UI[3]=Windows Presentation Foundation Host has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Windows\SysWOW64\PresentationHost.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\SYSTEM32\KERNEL32.DLL
LoadedModule[3]=C:\Windows\SYSTEM32\KERNELBASE.dll
LoadedModule[4]=C:\Windows\SYSTEM32\SYSFER.DLL
LoadedModule[5]=C:\Windows\SYSTEM32\ADVAPI32.dll
LoadedModule[6]=C:\Windows\SYSTEM32\USER32.dll
LoadedModule[7]=C:\Windows\SYSTEM32\msvcrt.dll
LoadedModule[8]=C:\Windows\SYSTEM32\ole32.dll
LoadedModule[9]=C:\Windows\SYSTEM32\OLEAUT32.dll
LoadedModule[10]=C:\Windows\SYSTEM32\mscoree.dll
LoadedModule[11]=C:\Windows\SYSTEM32\SHLWAPI.dll
LoadedModule[12]=C:\Windows\SYSTEM32\WININET.dll
LoadedModule[13]=C:\Windows\SYSTEM32\urlmon.dll
LoadedModule[14]=C:\Windows\SYSTEM32\SHELL32.dll
LoadedModule[15]=C:\Windows\SYSTEM32\sechost.dll
LoadedModule[16]=C:\Windows\SYSTEM32\RPCRT4.dll
LoadedModule[17]=C:\Windows\SYSTEM32\GDI32.dll
LoadedModule[18]=C:\Windows\SYSTEM32\combase.dll
LoadedModule[19]=C:\Windows\SYSTEM32\iertutil.dll
LoadedModule[20]=C:\Windows\SYSTEM32\USERENV.dll
LoadedModule[21]=C:\Windows\SYSTEM32\SspiCli.dll
LoadedModule[22]=C:\Windows\SYSTEM32\profapi.dll
LoadedModule[23]=C:\Windows\SYSTEM32\CRYPTBASE.dll
LoadedModule[24]=C:\Windows\SYSTEM32\bcryptPrimitives.dll
LoadedModule[25]=C:\Windows\system32\IMM32.DLL
LoadedModule[26]=C:\Windows\SYSTEM32\MSCTF.dll
LoadedModule[27]=C:\Windows\SYSTEM32\shcore.dll
LoadedModule[28]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationHost_v0400.dll
LoadedModule[29]=C:\Windows\SYSTEM32\MSVCR120_CLR0400.dll
LoadedModule[30]=C:\Windows\SYSTEM32\VERSION.dll
LoadedModule[31]=C:\Windows\SYSTEM32\PSAPI.DLL
LoadedModule[32]=C:\Windows\SYSTEM32\kernel.appcore.dll
LoadedModule[33]=C:\Windows\system32\uxtheme.dll
LoadedModule[34]=C:\Program Files (x86)\Common Files\microsoft shared\ink\tiptsf.dll
LoadedModule[35]=C:\PROGRA~3\WebEx\WebEx\1524\atasnt40.DLL
LoadedModule[36]=C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\MSVCP90.dll
LoadedModule[37]=C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_5094ca96bcb6b2bb\MSVCR90.dll
LoadedModule[38]=C:\Windows\SYSTEM32\clbcatq.dll
LoadedModule[39]=C:\Windows\SYSTEM32\CRYPTSP.dll
LoadedModule[40]=C:\Windows\system32\rsaenh.dll
LoadedModule[41]=C:\Windows\SYSTEM32\bcrypt.dll
LoadedModule[42]=C:\Windows\SYSTEM32\Faultrep.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=Windows Presentation Foundation Host
AppPath=C:\Windows\SysWOW64\PresentationHost.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=EADEDB5BC56DB23616B81B8F4ADC1C7E

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any help solving this would be great. I have had NICE support on this for weeks to no avail. I am pretty much slamming my head against the desk at this point.

WPF Dead or Not?

$
0
0

We've seen all the postings about WPF being Dead.  We heard from MSFT it was not, and they were starting to work on it again.  It's now about two years later and we see next to nothing regarding progress in WPF.   WPF was cutting edge technology and MVVM was "borrowed" by Angular to do client side binding very similar to what we already did with MVVM.  C'mon MSFT "Get Going"...  You're inaction is speaking loudly to us WPF adopters.

Should MSFT open source WPF being that they are unwilling to move it forward? 

Or should MSFT put a real plan together and let us know what's going on.  

Or is MSFT saying to us Typescript is the future and everything should be hosted in a browser which they don't have for WPF (without airspace issues).  

Here's a suggestion for MSFT, give us real browser so that we want and choose to embed your browser rather than CEF (Chrome Embedded Framework).  

How to implement Sorting in WPF DataGrid based on MVVM

$
0
0

How to implement Sorting in WPF DataGrid based on MVVM pattern?

DataGrid Contains the following columns:
1. Software
2. Version
3. TypeOfSoftware
4. ActivatedOn
5. Status
6. Actions [Activate, Deactivate etc]

Requirement:
1. When the Primary(TypeOfSoftware, ActivatedOn, Status) sorted column has duplicated values, use the values in the 'Software'column to determine the secondary sort order. When that column also has duplicated values, use the 'Version'column for the tertiary sort oder.

When applying secondary or tertiary sorting, the sort direction should match the primary sort column (i.e., all ascending or all descending).

Registration form impliment in MVVM project using WPF

$
0
0

Hi to all,

I want to develop a MVVM application and implement a registration form . in registration form using some button action perform likes :

Using 4 buttons :   SAVE , UPDATE ,   DELETE , CLEAR RECORD  .

and show record in ListView or GrigView .

Using MVVM

Please find below attached image :


A.Acharya Feedback to us Develop and promote your apps in Windows Store Please remember to mark the replies as answers if they help and unmark them if they provide no help.

How to publish my WPF browser application ?

$
0
0

I have designed a wpf browser application and i have published it to my website service in AZURE by ftp ,

in the last step of the publish  said to me :

The application will be published to:
ftp://waws-prod-am2-075.ftp.azurewebsites.windows.net/

Users will launch this application from:
http://desktop-qmq683g/WpfBrowserApplication1/

but the http that is  for the users is not a valid and not run with me....

now : How I and the other users can access  to my browser application??

I hope you to help me and thank you so much .

How to disable double click event on the Scroll bar and Header of the Datagrid.

$
0
0

Hi,

I have a datagrid which binds data from the database.Well when i double clicks on the datagrid's row it works fine.But the problem is that when i double click on either scroll bar or the header the double click event fires.Please tell me what i need to do.

Thanks in advance.

MD9CV-TRD9H-32VBM-G8XBB-JSSJJ

$
0
0

check this key MD9CV-TRD9H-32VBM-G8XBB-JSSJJ for windows basic home 

How do I load a ListView.View dynamically from a resource file?

$
0
0

I have a listView. For my application, I need to be able to display something like looks like an excel spreadsheet with multiple sortable columns containing text, or the same data structure as 3 columns with each column having a complex UI, and various versions of each style to account for various US/EU and provider differences.

My best guess to accomplish this is to take a ListView and load the necessary View from an external resource file. But I can't get it to work, at all. And most annoyingly, I've even found stack overflow answers where doing something like <ListView View="{Binding}"> was the correct answer, but no context for what that {Binding} was given.

Is anyone able to provide code that works, to do this?

My current code:

<ListView Name="MyListView" SelectionChanged="MyListView_SelectionChanged"><ListView.View><GridView x:Name="gvColumns"><GridViewColumn Width="35"><GridViewColumn.CellTemplate><DataTemplate><CheckBox IsChecked="{Binding isChecked}" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn><GridViewColumn Width="800"><GridViewColumn.Header><GridViewColumnHeader Tag="generic_name" Click="lvInventoryColumnHeader_Click">Product Name</GridViewColumnHeader></GridViewColumn.Header><GridViewColumn.CellTemplate><DataTemplate><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="auto"/><ColumnDefinition Width="auto"/></Grid.ColumnDefinitions><Grid.RowDefinitions><RowDefinition Height="auto"/><RowDefinition Height="auto"/><RowDefinition Height="auto"/><RowDefinition Height="auto"/></Grid.RowDefinitions><StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,12,0,0"><TextBlock Text="{Binding title}" FontWeight="Bold"/></StackPanel><StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"><TextBlock Text="{Binding info, StringFormat='Information: {0}'}"/><TextBlock Text="{Binding more, StringFormat=' More: {0} '}"/></StackPanel><TextBlock Text="{Binding item.prop1, StringFormat='Prop1: {0}', Converter={StaticResource yesNoConverter}}" Grid.Row="2" Grid.Column="0"/><TextBlock Text="{Binding item.prop2, StringFormat='Prop2: {0}'}" Grid.Row="2" Grid.Column="1"/><TextBlock Text="{Binding PROP3, StringFormat='PROP3: {0}'}" Grid.Row="3" Grid.Column="0" Margin="0,0,0,12"/><TextBlock Text="{Binding package, StringFormat='Package: {0}'}" Grid.Row="3" Grid.Column="1" Margin="0,0,0,12" Visibility="{Binding package, Converter={StaticResource visibilityConverter}}"/></Grid></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn><GridViewColumn Width="116"><GridViewColumn.Header><GridViewColumnHeader Tag="stockCount" Click="lvInventoryColumnHeader_Click">Stock On Hand</GridViewColumnHeader></GridViewColumn.Header><GridViewColumn.CellTemplate><DataTemplate><TextBlock Text="{Binding stockCount}" Margin="35,0,0,0"/></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn><GridViewColumn Width="120" Header="Actions"><GridViewColumn.CellTemplate><DataTemplate><StackPanel Orientation="Horizontal" HorizontalAlignment="Center"><Button Click="btn_ItemEdit_Click" Tag="{Binding}" Content="Edit" Style="{StaticResource inlineButton}"/><Button Click="btn_ItemDelete_Click" Tag="{Binding}" Content="Delete" Style="{StaticResource inlineButton}"/></StackPanel></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn></GridView></ListView.View></ListView>

Thanks in advance.

Viewing all 18858 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>