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

Strange XAML databinding in ComandParameter not passing?

$
0
0

I have another one that I came across today that I thought would work, but didn't.

I'm using a DataGrid where the SelectedItem has a databinding to the ViewModel called SelectedLinkItem and it is working when each time I select a row, it definitely updates back to the ViewModel.

I'm using a RowDetailsTemplate with the following:

<DataTemplate x:Key="linkTemplate"><TextBox Text="{Binding AlternativeLink, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="3" /><Button Grid.Column="1" Margin="3" Content="Link" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.NavBrowserCommand}" CommandParameter="{{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.SelectedLinkItem.AlternativeLink}" />

</DataTemplate>

Now the Command property is working and it definitely firing in the ViewModel by hitting a breakpoint within the NavBrowserCommand, but the CommandParameter is null, yet when I look at the SelectedLinkItem.AlternativeLink, it definitely has the correct URL.

So why is it that the URL string not being passed?

The reason why I am going through this route is that I'm going to be adding in more Links (like Link1, Link2, Link3, etc) but I want to use one ICommand to spawn off the link to a browser. 

I also planning on doing something else within the RowDetailsTemplate, but the values will not be supplied by the DataGrid, and instead will come from the databindings from the ViewModel.

So all you gurus.... any idea on what I am doing wrong?? :-D




Specified element is already the logical child of another element. Disconnect it first.

$
0
0

Been work for quite some time to resolve this error. 

Specified element is already the logical child of another element. Disconnect it first.

When opening the form for the first time,  everything works fine.  Close the form and reopen,  we get the above error message.  What is really strange is the object that is used to open the window goes out of scope as soon as it closes.  In addition,  it is being set to Null, but we still get this error.  We have read all about RemoveLogicalChild and RemoveVisualChild, but does not seem to help. 

The code is very simple,  we are building a dynamic menu,  the first row gets added to MenuStack1 and second to MenuStack2.  Then both are added to a StackPanel that is created in XAML, MenuStack 

The MenuStack object is created in XAML and everything else is in code,  although we have tried both, get same issue.

If anyone could an explanation of how to correct this issue,  would be greatly appreciated...

C# Code

 MenuStack1 = new StackPanel();
 MenuStack2 = new StackPanel();
            
 MenuStack1.SetValue(Grid.RowProperty, 1);
 MenuStack1.SetValue(Grid.RowSpanProperty, 1);
 MenuStack1.SetValue(Grid.ColumnProperty, 1);
 MenuStack1.SetValue(Grid.ColumnSpanProperty, 1);
 MenuStack1.Orientation = Orientation.Horizontal;
 MenuStack1.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
 MenuStack1.VerticalAlignment = System.Windows.VerticalAlignment.Top;

 MenuStack2.SetValue(Grid.RowProperty, 1);
 MenuStack2.SetValue(Grid.RowProperty, 1);
 MenuStack2.SetValue(Grid.RowProperty, 1);
 MenuStack2.SetValue(Grid.RowProperty, 1);
 MenuStack2.Orientation = Orientation.Horizontal;
 MenuStack2.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
 MenuStack2.VerticalAlignment = System.Windows.VerticalAlignment.Top;

MenuStack.Children.Insert(0,MenuStack1);
MenuStack.Children.Insert(1,MenuStack2);

buttonMenuStack1List = new List<ButtonMenuStack>();
 buttonMenuStack2List = new List<ButtonMenuStack>();
 
   buttonMenuStack1List = DataAccess_Static.buttonMenuStack1List;
   foreach (ButtonMenuStack bms1 in buttonMenuStack1List)

     {

//   Issue occurs here on Second Opening of the Window in  Window_Loaded event

      MenuStack1.Children.Add(bms1.ButtonMenuObj);  *** 


     }

     buttonMenuStack2List = DataAccess_Static.buttonMenuStack2List;
     foreach (ButtonMenuStack bms2 in buttonMenuStack2List)
        {
           MenuStack2.Children.Add(bms2.ButtonMenuObj);
                
      }

Datatable

$
0
0

Hello!

Thespacingenters thetraningName.
Enterthe numberinfront oftraningName.

An erroroccurs.

DataTable dt;

string traningName = "Happy Day";  <- space

string traningName = "123 Happy";  <- number

string statusContent = "GOOD"; 

DataRow[] rows = dt.Select(traningName + "= '" + statusContent + "'");

please answer~

Edit record of Datagrid

$
0
0
Hi,
Further to this thread

I want to see an example:

1. Each row of Datagrid, is having one Edit button
2. When Edit button is clicked, Save & Cancel buttons would be available
3. Save button would save the record changed
4. Cancel button would restore the record to its original values
5. If either Save or Cancel buttons are not clicked, we cannot "jump" to other record.

Many Thanks & Best Regards, Hua Min


How to group datagrid like multi-level tree in WPF

$
0
0

Hi,

I have a task to group data in DataGrid like a tree as following mockup:

Does anybody know to write the GroupStyle? Thanks.

position of the cursor

$
0
0

The below sample  works fine for single monitor system But issue raises while using the application in dual monitor system

ISSUE : When i try to drag my application while it is in secondary monitor, application gets restored to the primary monitor.

Expected result: While dragging, application should get restored in the monitor where the application is present. How to achieve it?

publicpartialclassWindow1:Window
   
{
       
publicWindow1()
       
{
           
InitializeComponent();
       
}


       
privatevoid header_Loaded(object sender,RoutedEventArgs e)
       
{
           
InitHeader(senderasTextBlock);
       
}

       
privatevoidInitHeader(TextBlock header)
       
{
           
var restoreIfMove=false; header.MouseLeftButtonDown+=(s, e)=>
           
{
               
if(e.ClickCount==2)
               
{if((ResizeMode==ResizeMode.CanResize)||
                       
(ResizeMode==ResizeMode.CanResizeWithGrip))
                   
{
                       
SwitchState();
                   
}
               
}
               
else
               
{
                   
if(WindowState==WindowState.Maximized)
                   
{
                        restoreIfMove
=true;
                   
}

                   
DragMove();
               
}
           
};
            header
.MouseLeftButtonUp+=(s, e)=>
           
{
                restoreIfMove
=false;
           
};
            header
.MouseMove+=(s, e)=>
           
{
               
if(restoreIfMove)
               
{
                    restoreIfMove
=false;
                   
var mouseX = e.GetPosition(this).X;
                   
var width =RestoreBounds.Width;
                   
var x = mouseX - width/2;

                   
if(x <0)
                   
{
                        x
=0;
                   
}
                   
else
                   
if(x + width>SystemParameters.PrimaryScreenWidth)
                   
{
                        x
=SystemParameters.PrimaryScreenWidth- width;
                   
}

                   
WindowState=WindowState.Normal;
                   
Left= x;
                   
Top=0;
                   
DragMove();
               
}
           
};
       
}

       
privatevoidSwitchState()
       
{
           
switch(WindowState)
           
{
               
caseWindowState.Normal:
                   
{
                       
WindowState=WindowState.Maximized;
                       
break;
                   
}
               
caseWindowState.Maximized:
                   
{
                       
WindowState=WindowState.Normal;
                       
break;
                   
}
           
}
       
}
   
}


null reference error

$
0
0
 case "Buyer Name":
                    if (searchText == "")
                        cv.Filter = null;
                    else
                    {
                        if (fromDate.ToString() == "" && toDate.ToString().Trim() == "")
                        {
                            cv.Filter = o =>
                            {
                                Form form = o as Form;
                                return (form.Contact.ContactName.ToLower().Contains(searchText));
                            };
                        }Exception thrown: 'System.NullReferenceException' in WincoWPF.exe

<exception>:Additional information: Object reference not set to an instance of an object.

asif bakhtiyar

FailFast after GetWindowMinMax Assertion

$
0
0

Our application is being shut down by the PresentationFramework unexpectedly. The following call stack shows how it got to this point.  Since it is a FailFast which causes our application to crash, we have no way of catching an exception then gracefully recover. Any insight as to how this is happening would be much appreciated.

  [Managed to Native Transition] 
> WindowsBase.dll!MS.Internal.Invariant.FailFast(string message, string detailMessage) Unknown
  WindowsBase.dll!MS.Internal.Invariant.Assert(bool condition, string invariantMessage) Unknown
  PresentationFramework.dll!System.Windows.Window.GetWindowMinMax() Unknown
  PresentationFramework.dll!System.Windows.Window.MeasureOverride(System.Windows.Size availableSize) Unknown
  PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Unknown
  PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Unknown
  PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() Unknown
  PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) Unknown
  PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() Unknown
  PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() Unknown
  PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) Unknown
  PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) Unknown
  WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
  WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
  WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown
  WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
  WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
  WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
  WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
  WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
  WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
  WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
  WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
  WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
  WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
  [Native to Managed Transition] 
  user32.dll!_InternalCallWinProc@20() Unknown
  user32.dll!_UserCallWinProcCheckWow@32() Unknown
  user32.dll!_DispatchMessageWorker@8() Unknown
  user32.dll!_DispatchMessageW@4() Unknown
  WindowsBase.ni.dll!6a463b34() Unknown
  [Frames below may be incorrect and/or missing, no symbols loaded for WindowsBase.ni.dll] 
  [Managed to Native Transition] 
  WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
  WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Unknown
  WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() Unknown
  Zetta.exe!RCS.ZettaUI.ControlHost.a() Unknown
  mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
  mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown
  [Native to Managed Transition] 
  kernel32.dll!@BaseThreadInitThunk@12() Unknown
  ntdll.dll!___RtlUserThreadStart@8() Unknown
  ntdll.dll!__RtlUserThreadStart@8() Unknown

Thanks

Dan


WPF DataGridCheckBox check/uncheck doesn't work well

$
0
0

I have a DataGridCheckBox column bound to a field in DB. The issue is that sometimes the check/uncheck works right away, and sometimes it doesn't, even if I click many times, the click won't stay. In these cases, the only thing that solves this is clicking the CheckBox, and while mouse down, dragging to next field and leave mouse. This way the checked/uncheck stays fine...

This is the code:

DataGridCheckBoxColumn x:Name="to_send"Binding="{Binding to_send, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"Width="150"Header="To Send ?"IsThreeState="False"ElementStyle="{StaticResource {x:Type CheckBox}}"

Any ideas how to solve this ?

Thanks, Ronit.


Access to a non public property and set it

$
0
0

I would like to access the browser property (myEditor is an object that has inside a WebBrowser control) . From quick watch at debug time I am able to set properly, but I find it impossible to code.

myEditor.Browser.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Bottom

How can I do it?

Thanks


www.Photoballot.net

"Simple" layout does not work

$
0
0

I am trying to do the following.

1.  I have a UserControl lets call it UC1

2.  I want to display a listbox of UC1.  I have background data and binding correct.

3.  What I want to display is a smaller version of the UC such that it could display in either a WrapPanel or UniformGrid as the ItemsPanel

Now I cannot get this to work correctly.  I have used/not used sizes for the UC, used sizes for the ListBoxItem, tried scaling the UC1 in the datatemplate of the itemtemplate.  Nothing seems to work.

My latest attempt:

UC XAML

<UserControl x:Class="GamePlayCardUC"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             Height="140" Width="360" Background="Transparent"><Border BorderBrush="#FF8D6A0C" BorderThickness="8" CornerRadius="15" Background="Beige" Padding="10"><Grid><Grid.RowDefinitions><RowDefinition Height="3*"></RowDefinition><RowDefinition Height="5*"></RowDefinition></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition Width="1*"></ColumnDefinition><ColumnDefinition Width="2*"></ColumnDefinition></Grid.ColumnDefinitions><Image Grid.Column="0" Grid.Row="0" Source="Images/treasure-chest-open-icon.png"></Image><TextBlock Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding CardText}" FontSize="20"  HorizontalAlignment="Center" VerticalAlignment="Center"  ></TextBlock></Grid></Border></UserControl>

ListBox XAML:

<ListBox x:Name="GamePlayCards" ScrollViewer.CanContentScroll="False"
                                                 ItemsSource="{Binding GamePlayCards}" HorizontalContentAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Red"><ListBox.ItemsPanel><ItemsPanelTemplate><WrapPanel></WrapPanel></ItemsPanelTemplate></ListBox.ItemsPanel><ListBox.ItemContainerStyle><Style TargetType="ListBoxItem" ><Setter Property="Width" Value="250"></Setter></Style></ListBox.ItemContainerStyle><ListBox.ItemTemplate><DataTemplate><local:GamePlayCardUC><local:GamePlayCardUC.RenderTransform><TransformGroup><ScaleTransform ScaleX="0.4" ScaleY="0.4"/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></local:GamePlayCardUC.RenderTransform></local:GamePlayCardUC></DataTemplate></ListBox.ItemTemplate></ListBox>

What I need is to be able to somehow show the entire UC scaled down such that at least 2 will show (attempt using UniformGrid is a real failure).


Lloyd Sheen

How to wait for Asycn operation in a Console app

$
0
0

Dear all,

I have build a Console application which is in charge to collect data to a remote web service server and store return data in local SQL server db. Then those data gets read by a WPF application.

What the console application does is a sycn process at regular time. For better handling sycn period I have configuring then windows task to run my concole app at desire time.

The problem I have is that consol app entry point need to be static, then inside my Main method I am calling a StartSycn process which is calling a set of async method.

In normal WPF entry point I would define that parent method call as async method but here I cannot because it is not allowed for a Console app entry point.

Due to that for debuging purpose I need to do the follwowing in order to be able to complete my sycn process

static void Main(string[] args)
		{

			Start();
			Console.ReadLine();

		}

		static async void Start()
		{
			await StartSync.StartSyncProcess();
		}

In realease mode, my console app should start and close only when sync is completed.

So I can I get ride of the Console.ReadLine in order that Console app stop only when async method Start is completed ?

regards

Disable/enable scroll bar visibility with height

$
0
0

There is a grid. The height of the window and Grid is 670.

Case 1. When the user expands the window i want to show the scrollbar. Otherewise i don't show the scrollbar. How to do this?

case 2. This is nothing to do with case.1 but similar. In this case when the user shrinks the window size i want to show the scrollbar. How can we do this?

ScrollbarVisibility set to auto didn't work.



Multiple DrawingVisuals Objects?

$
0
0

Hello!

I'm creating a game using the DrawingVisual method.

I want to set a ShaderEffect on a certain layer of a DrawingVisual, sadly this doesn't work with the PushEffect method. So i thought that i will make a separate DrawingVisual that will shade the background yet leave the foreground unshaded in another DrawingVisual object.

I can't get my wpf application to display multiple DrawingVisual objects, only one of them. Anyone have any suggestions?

I have tried to change the "VisualHost??" like this(Visual Basic Code): 

    Protected Shadows ReadOnly Property VisualChildrenCount() As Integer

        Get

            Return 2

        End Get

    End Property
    Protected Overrides Function GetVisualChild(ByVal index As Integer) As Visual

        If index = 0 Then
            GetVisualChild = dv
        ElseIf index = 1 Then
            GetVisualChild = dv2
        End If

    End Function
Thanks for all answers!

Combobox caret position

$
0
0

The combox cursor position doesn't change with the text when i am typing the new text. To handle this i did the code behind:

  private void MyComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox MyCombo = sender as ComboBox;

            if (MyCombo != null)
            {
                TextBox text = MyCombo.Template.FindName("PART_EditableTextBox", MyCombo) as TextBox;

                if (null != text)
                {
                    text.Select(text.Text.Length, 0);
                }
            }

        }

But the selection changed is not triggered when entering the new text. The same is happening with comobobox textInput event.

Combobx xaml:

<ComboBox FontSize="13"
                      IsEditable="True"
                      Margin="2,0,2,5"
                      Text="{Binding MyData}"
                      ItemsSource="{Binding Path=MyNumbers}"
                      SelectedValuePath="Number"
                      SelectedValue="{Binding Path=MyData}"
                      ItemTemplate="{StaticResource MyTemplate}"
                      Width="175"
                      Name="QuickDialComboBox"
                      Grid.Column="0"
                      SelectionChanged="MyComboBox_SelectionChanged"></ComboBox><DataTemplate x:Key="MyTemplate"><StackPanel Name="ItemContainer" Background="{Binding Path=Background}" HorizontalAlignment="Stretch" MaxWidth="200"><TextBlock Text="{Binding MyItem, StringFormat='\{0\}                              '}"
                           Foreground="{Binding Path=Foreground}" TextWrapping="NoWrap" Margin="10,0,0,0" MaxWidth="200"/></StackPanel></DataTemplate>



Re-displaying adorner for listbox?

$
0
0

Hi all,

I have two listboxes (fillPartNumberListbox and fillWorkOrderListbox) that show "Loading..." as an adorner when my program starts (in Window_ContentRendered). The code snippets are shown below. A couple of tasks fill the listboxes with data from a database. The listboxes are filled with data and the adorners are removed. I want to re-enable or re-display the adorner in the fillWorkOrderListbox when the user clicks an item in the fillPartNumberListbox. I duplicated the code in  partNoListbox_SelectionChanged  from the Window_ContentRendered for the adorner but it doesn't work. I tried different variation without luck. I'm obviously doing something wrong since I'm new to wpf. Could someone point me in the right direction please?

Thanks

private void Window_ContentRendered(object senderEventArgs e)
{
  busyAdornerLayer = AdornerLayer.GetAdornerLayer(workOrderListbox);
  busyAdornerLayer.Add(new busyAdorner(workOrderListbox));

  busyAdornerLayer = AdornerLayer.GetAdornerLayer(partNoListbox);
  busyAdornerLayer.Add(new busyAdorner(partNoListbox));

  Task TaskWO = Task.Factory.StartNew (fillWorkOrderListbox);
  Task TaskPN = Task.Factory.StartNew(fillPartNumberListbox);
}
private void partNoListbox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
  if (partNoListbox.SelectedItem != null)
  {
    //None of these worked !! HELP
    //busyAdornerLayer = AdornerLayer.GetAdornerLayer(workOrderListbox);
    //busyAdornerLayer.Add(new busyAdorner(workOrderListbox));
    //Dispatcher.BeginInvoke(new Action(delegate (){ busyAdornerLayer.Add(new busyAdorner(workOrderListbox)); }));


    workOrderListbox.ItemsSource = "";  //clear workOrderListbox

    List<Int32> woList = new List<Int32>();

    Database_easy Database_easyOBJ = new Database_easy();
    woList = Database_easyOBJ.GetWorkOrders(partNoListbox.SelectedValue.ToString());

    if (woList.Count > 0)
      Dispatcher.BeginInvoke(new Action(delegate()
      {
        workOrderListbox.ItemsSource = woList;

        //This should remove adorner
        //Adorner[] toRemoveArray = busyAdornerLayer.GetAdorners(workOrderListbox);
        //busyAdornerLayer.Remove(toRemoveArray[0]);
      }));

}


Replacement for Microsoft.Practices.SmartClient.EndpointCatalog‏

$
0
0

Hi,

I've a WPF app that uses the EndpointCatalog block.

I've received the remark that it was not supported anymore by Microsoft.

Are you aware of a replacement library for EndpointCatalog ?

Thanks in advance


philippe

Setting up SQL Server in Visual Studio

$
0
0

Hi to all

Well, I've used databases before, but they were always already running.  Now I'd like to set up my own to try out Entity Framework.  I heard that VS2015 Community Edition comes with a DB Server, amongst others, MS SQL Server.  And, when I follow these instructions, I get a choice of various servers, but I DON'T get a choice for server name.  The server name is empty!  I'm assuming, you have to get the server running.  How do I do this?  What I need is baby steps.  As I said, I only have VS2015 Community Edition and I happen to have Access (although I think that'll come in handy once I have my server running).

Thanks to all


MarcinMR

PS

I know this is a WPF Forum, but the support on this forum is great, and I thought I'd try asking here.  Pardon in advance


How to convert wpf richtextbox content to html?

$
0
0

I need to allow the user  to enter data i.e bold, or underline or colored and need to display the same way. I choose richtextbox as editor. And the data will be viewed in browser.
But how can I get the content of richtextbox in html format?

CAn anybody provide guidence in that direction?

Raise Property Changed for Object Instance, not derived from INotifyPropertyChanged

$
0
0

Hi,

   I have a specific requirement, of Raising Property changed notification for Properties of an Object, which is not Inherited from INotifyPropertyChanged.

 Below is a sample code snippet for my query. I am advised, not to touch TestClass.

public class TestClass { public TestClass() { // // TODO: Add constructor logic here // private string title=string.Empty; /// <summary> /// Title of Object /// </summary> public string Title { get { return title;} set { title = value;} } } public class TestViewModel { private TestClass testClass; public TestClass TestInstance { get { return testClass;} set { testClass = value;} } public void MyTestMethod() { TestInstance.Title = "New Title"; //Raise notification for Title, as its bound on (XAML) View, through TestInstance.Title to a Textbox

} } }

Is there any way to resolve the query?

Thanks in advance :),

Sagar

Viewing all 18858 articles
Browse latest View live


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