本文整理汇总了C#中Visibility类的典型用法代码示例。如果您正苦于以下问题:C# Visibility类的具体用法?C# Visibility怎么用?C# Visibility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Visibility类属于命名空间,在下文中一共展示了Visibility类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MessageViewModel
public MessageViewModel(int uid, int mid, string body, string dateTime, bool isOut, bool isSent, bool isRead,
bool isDeleted, BitmapImage accountPhoto, ObservableCollection<AttachmentViewModel> attachments)
{
_isSelected = false;
Mid = mid;
Uid = uid;
_body = body;
_dateTime = dateTime;
_photo = accountPhoto;
_SetUserData(uid);
_isOut = isOut;
_isRead = isRead;
_isDeleted = isDeleted;
if (isSent && isOut && !isRead)
_notReadVisibility = Visibility.Visible;
else
_notReadVisibility = Visibility.Collapsed;
_isSent = isSent;
_attachments = attachments;
}
示例2: NewModel
public static ServiceModel NewModel(Type compositeType,
Visibility visibility,
MetaInfo metaInfo,
IEnumerable<Type> assemblyConcerns,
IEnumerable<Type> sideEffects,
IList<Type> mixins,
String moduleName,
String identity,
bool instantiateOnStartup)
{
PropertyDeclarations propertyDeclarations = new MetaInfoDeclaration();
var constraintsModel = new ConstraintsModel(compositeType);
bool immutable = metaInfo.Get<ImmutableAttribute>() != null;
var propertiesModel = new ServicePropertiesModel(constraintsModel, propertyDeclarations, immutable);
var stateModel = new ServiceStateModel(propertiesModel);
var mixinsModel = new MixinsModel(compositeType, mixins);
var concerns = new List<ConcernDeclaration>();
ConcernsDeclaration.ConcernDeclarations(assemblyConcerns, concerns);
ConcernsDeclaration.ConcernDeclarations(compositeType, concerns);
var concernsModel = new ConcernsDeclaration(concerns);
var sideEffectsModel = new SideEffectsDeclaration(compositeType, sideEffects);
var compositeMethodsModel = new CompositeMethodsModel(compositeType, constraintsModel, concernsModel, sideEffectsModel, mixinsModel);
stateModel.AddStateFor(compositeMethodsModel.Properties, compositeType);
return new ServiceModel(
compositeType, visibility, metaInfo, mixinsModel, stateModel, compositeMethodsModel, moduleName, identity, instantiateOnStartup);
}
示例3: FileUploadSettingsPage
public FileUploadSettingsPage()
{
InitializeComponent();
this.DataContext = YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount;
if (YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.EnableFileUpload)
{
this.m_CommentVisibility = System.Windows.Visibility.Collapsed;
this.CheckBoxEnabled.IsChecked = true;
if (string.IsNullOrEmpty(YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileUploadDirectory) == true)
{
this.LocalFileUploadDirectory = @"C:\Program Files\Yellowstone Pathology Institute\Client Services\Reports";
}
else
{
this.LocalFileUploadDirectory = YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount.LocalFileUploadDirectory;
}
}
else
{
this.m_CommentVisibility = System.Windows.Visibility.Visible;
this.CheckBoxEnabled.IsChecked = false;
}
this.DataContext = this;
MainWindow mainWindow = (MainWindow)System.Windows.Application.Current.MainWindow;
this.HyperlinkSignOut.Click += new RoutedEventHandler(mainWindow.ButtonSignOut_Click);
Loaded += new RoutedEventHandler(FileUploadSettingsPage_Loaded);
}
示例4: DataGridColumn
/// <summary>
/// Initializes a new instance of the <see cref="T:System.Windows.Controls.DataGridColumn" /> class.
/// </summary>
protected internal DataGridColumn()
{
this._visibility = Visibility.Visible;
this._displayIndexWithFiller = -1;
this.IsInitialDesiredWidthDetermined = false;
this.InheritsWidth = true;
}
示例5: New
/// <summary>
/// Creates an instance of <see cref="IBoilerplateContext"/>
/// </summary>
/// <param name="identity">The current identity being used (rights and roles contract requirements/restrictions will apply to this identity)</param>
/// <param name="accessProvider">An access provider for specific types (available through IBoilerplateContext.Open<T>())</param>
/// <param name="permissionsProvider">The provider that will be used for all permissions verification attempts</param>
/// <param name="visibility">The visibility level that this context has. This will affect operations that rely on visibility (e.g. logging).</param>
/// <returns>An instance of <see cref="IBoilerplateContext"/></returns>
public static IBoilerplateContext New(IIdentity identity = null,
ITypeAccessProvider accessProvider = null,
IPermissionsProvider permissionsProvider = null,
Visibility visibility = Visibility.None)
{
var actualIdentity = identity ?? Identity.Default;
var actualTypeAccessProvider = accessProvider ?? TypeAccessProvider.Empty;
var actualPermissionsProvider = permissionsProvider ?? PermissionsProvider.Default;
var functionGenerator = new FunctionGenerator();
//Core providers
var translationProvider = new TranslationProvider(functionGenerator);
var validationProvider = new ValidationProvider(functionGenerator);
var logProvider = new LogProvider(functionGenerator, visibility);
//Set up error handling
var tryCatchProvider = new TryCatchBlockProvider(functionGenerator);
var exceptionHandlerProvider = new ExceptionHandlerProvider(logProvider);
var errorContext = new ImmutableErrorContext(logProvider, tryCatchProvider, exceptionHandlerProvider);
var bundle = new ContextBundle(permissionsProvider: actualPermissionsProvider,
errorContext: errorContext,
translationProvider: translationProvider,
accessProvider: actualTypeAccessProvider,
validationProvider: validationProvider,
logProvider: logProvider,
visibility: visibility);
return new InitialBoilerplateContext<ContractContext>(bundle, actualIdentity);
}
示例6: CreateEdgeControl
public EdgeControl CreateEdgeControl(VertexControl source, VertexControl target, object edge, bool showLabels = false, bool showArrows = true, Visibility visibility = Visibility.Visible)
{
var edgectrl = new EdgeControl(source, target, edge, showLabels, showArrows) { Visibility = visibility, RootArea = FactoryRootArea};
return edgectrl;
}
示例7: PropertyBase
protected PropertyBase(PropertyEditor owner)
{
Owner = owner;
isEnabled = true;
isVisible = Visibility.Visible;
}
示例8: ProviderDistributionPage
//private bool m_Closing;
public ProviderDistributionPage(string reportNo,
YellowstonePathology.Business.Test.AccessionOrder accessionOrder,
YellowstonePathology.UI.Navigation.PageNavigator pageNavigator,
Visibility nextButtonVisibility,
Visibility closeButtonVisibility,
Visibility backButtonVisibility)
{
this.m_PageNavigator = pageNavigator;
this.m_AccessionOrder = accessionOrder;
this.m_PanelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo);
this.m_NextButtonVisibility = nextButtonVisibility;
this.m_CloseButtonVisibility = closeButtonVisibility;
this.m_BackButtonVisibility = backButtonVisibility;
this.m_SystemUserCollection = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection;
this.m_ClientPhysicianNotSetAuditCollection = new Business.Audit.Model.AuditCollection();
this.m_ClientPhysicianNotSetAuditCollection.Add(new YellowstonePathology.Business.Audit.Model.ClientNotSetAudit(this.m_AccessionOrder));
this.m_ClientPhysicianNotSetAuditCollection.Add(new YellowstonePathology.Business.Audit.Model.PhysicianNotSetAudit(this.m_AccessionOrder));
InitializeComponent();
DataContext = this;
this.Loaded += new RoutedEventHandler(ProviderDetailPage_Loaded);
Close += ProviderDistributionPage_Close;
}
示例9: ReviewClientOrderPage
public ReviewClientOrderPage(YellowstonePathology.Business.Rules.Surgical.PatientRecentAccessions patientRecentAccessions,
YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder,
UI.Navigation.PageNavigator pageNavigator)
{
this.m_PatientRecentAccessions = patientRecentAccessions;
this.m_ClientOrder = clientOrder;
this.m_PageNavigator = pageNavigator;
InitializeComponent();
this.DataContext = this;
if (this.m_ClientOrder.Accessioned == true)
{
this.m_CloseButtonVisibility = System.Windows.Visibility.Collapsed;
this.m_NextButtonVisibility = System.Windows.Visibility.Visible;
}
else
{
this.m_CloseButtonVisibility = System.Windows.Visibility.Visible;
this.m_NextButtonVisibility = System.Windows.Visibility.Collapsed;
}
this.Loaded += new RoutedEventHandler(ReviewClientOrderPage_Loaded);
}
示例10: ViewLinksViewModel
/// <summary>
/// Initializes a new instance of the <see cref="ViewLinksViewModel"/> class.
/// </summary>
/// <param name="linkViewModel">
/// The link view model.
/// </param>
/// <param name="links">
/// The links.
/// </param>
public ViewLinksViewModel(LinkViewModel linkViewModel, ObservableCollection<LinkViewModel> links)
{
this.Links = links;
this.SelectedItem = linkViewModel;
this.uiVisibility = Visibility.Visible;
}
示例11: SetBusyVisibility
public static void SetBusyVisibility(Visibility visible, string text = null)
{
WindowWrapper.Current().Dispatcher.Dispatch(() =>
{
switch (visible)
{
case Visibility.Visible:
Instance.IsBusyVisible = true;
Instance.FindName(nameof(BusyScreen));
Instance.BusyText.Text = text ?? string.Empty;
if (VisualStateManager.GoToState(Instance, Instance.BusyVisualState.Name, true))
{
SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
AppViewBackButtonVisibility.Collapsed;
}
break;
case Visibility.Collapsed:
Instance.IsBusyVisible = false;
if (VisualStateManager.GoToState(Instance, Instance.NormalVisualState.Name, true))
{
BootStrapper.Current.UpdateShellBackButton();
}
break;
}
});
}
示例12: ChangeVisibility
// metoda zmienia visibility każdej zakładki,
//index decyduje która zakładka ma zostac wybrana jako początkowa
public void ChangeVisibility(int index=0,
Visibility Login=Visibility.Collapsed,
Visibility Tab=Visibility.Collapsed,
Visibility UserAcc=Visibility.Collapsed,
Visibility RoomsVis = Visibility.Collapsed,
Visibility InstituteManagmentVis = Visibility.Collapsed,
Visibility DictionaryVis = Visibility.Collapsed,
Visibility InstituteDevicesList = Visibility.Collapsed,
Visibility InstituteWorkersList = Visibility.Collapsed,
Visibility RaportsVis = Visibility.Collapsed,
Visibility LogoutVis= Visibility.Visible
)
{
LoginControl.Visibility = Login;
UserAccount.Visibility = UserAcc;
Rooms.Visibility = RoomsVis;
InstituteManagment.Visibility = InstituteManagmentVis;
Dictionary.Visibility = DictionaryVis;
InstituteDevicesManagment.Visibility = InstituteDevicesList;
InstituteWorkersManagment.Visibility = InstituteWorkersList;
Raports.Visibility = RaportsVis;
MenuControl.Visibility = LogoutVis;
TabControlMenu.SelectedIndex=index;
TabControlMenu.Visibility = Tab;
}
示例13: GetValueModelFor
public ValueModel GetValueModelFor(Type mixinType, Visibility visibility)
{
ValueModel foundModel = null;
foreach (ValueModel composite in this.valueModels)
{
if (typeof(ValueComposite).IsAssignableFrom(mixinType))
{
if (mixinType == composite.CompositeType && composite.Visibility == visibility)
{
if (foundModel != null)
{
throw new AmbiguousTypeException(mixinType, foundModel.CompositeType, composite.CompositeType);
}
foundModel = composite;
}
}
else
{
if (mixinType.IsAssignableFrom(composite.CompositeType) && composite.Visibility == visibility)
{
if (foundModel != null)
{
throw new AmbiguousTypeException(mixinType, foundModel.CompositeType, composite.CompositeType);
}
foundModel = composite;
}
}
}
return foundModel;
}
示例14: ListBoxItem_Selected_0
private void ListBoxItem_Selected_0(object sender, RoutedEventArgs e)
{
cantGoForward = false;
comp1Active = System.Windows.Visibility.Visible;
comp2Active = System.Windows.Visibility.Hidden;
comp3Active = System.Windows.Visibility.Hidden;
comp4Active = System.Windows.Visibility.Hidden;
comp5Active = System.Windows.Visibility.Hidden;
opponent1.Visibility = System.Windows.Visibility.Visible;
opponent1textBox.Visibility = System.Windows.Visibility.Visible;
opponent1.IsEnabled = true;
opponent2.Visibility = System.Windows.Visibility.Hidden;
opponent2textBox.Visibility = System.Windows.Visibility.Hidden;
opponent2.IsEnabled = false;
opponent3.Visibility = System.Windows.Visibility.Hidden;
opponent3textBox.Visibility = System.Windows.Visibility.Hidden;
opponent3.IsEnabled = false;
opponent4.Visibility = System.Windows.Visibility.Hidden;
opponent4textBox.Visibility = System.Windows.Visibility.Hidden;
opponent4.IsEnabled = false;
opponent5.Visibility = System.Windows.Visibility.Hidden;
opponent5textBox.Visibility = System.Windows.Visibility.Hidden;
opponent5.IsEnabled = false;
}
示例15: VisitModules
public bool VisitModules(ModuleVisitor visitor, Visibility visibility)
{
// Visit modules in this layer
foreach (ModuleInstance moduleInstance in this.moduleInstances)
{
if (!visitor.VisitModule(moduleInstance, moduleInstance.Model, visibility))
{
return false;
}
}
if (visibility == Visibility.Layer)
{
// Visit modules in this layer
if (!this.VisitModules(visitor, Visibility.Application))
{
return false;
}
// Visit modules in used layers
return this.UsedLayersInstance.VisitModules(visitor);
}
return true;
}