0

How can i change the public access specifier to internal of window.

<Window x:Class="MyName.MyWindow" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

How to change access specifier from public to internal

internal partial class MyWindow : Window

{ ........................ }

this statement show error ... have conflicting accessibility modifiers. How can i achieve this in WPF?

Kishore Kumar
  • 21,449
  • 13
  • 81
  • 113
  • 4
    By using the [`x:ClassModifier="internal"`](http://msdn.microsoft.com/en-us/library/ms754029.aspx) directive. – Rick Sladkey Sep 15 '11 at 05:50
  • possible duplicate of [Making a XAML file internal in .Net](http://stackoverflow.com/questions/647109/making-a-xaml-file-internal-in-net) – Rick Sladkey Sep 15 '11 at 06:07
  • I found a duplicate instead. Here's another: [Hide control within a WPF User Control Library](http://stackoverflow.com/questions/3717294/hide-control-within-a-wpf-user-control-library) – Rick Sladkey Sep 15 '11 at 06:10

1 Answers1

0

Correct the both partial classes parts

You just have

internal partial class MyWindow : Window {
public class MyWindow {

Switch to

internal partial class MyWindow : Window {
internal class MyWindow {
Alan Turing
  • 2,482
  • 17
  • 20