본문 바로가기

C#(CSharp)/WPF18

XAML Custom Namespace A Guide to Cleaner XAML with Custom Namespaces and Prefixes (WPF/Silverlight) When working with any type of application, it's a good idea to split up your solution in multiple projects (assemblies) and namespaces. As your project grows, you'll see your amount of namespaces grow with it. And if you plan to use classes / controls from these namespaces in your XAML code, you'll have to declare them.. 2015. 4. 8.
다국어 작업(Globalization, Localization) WPF에서 다국어 작업 하는것에 정리 해 보았습니다. ---------------------------------------------------------------------------------------------------------- ** 오늘 다국어 관련 작업을 하는데 xaml에서 적용이 잘 안되는 현상이 발생했습니다. 한 30분 삽질하다 visual studio를 재시작한 후 의도 했던 대로 정상 동작했습니다. xaml에서 외부 라이브러리 참조가 잘 안될 경우 아래 2가지를 추천합니다. 1) 맞춤법, 대소문자를 다시 확인 합니다. 2) visual studio 2013을 종료한후 다시 시작한 후, 모두 rebuild합니다. -------------------------------------.. 2015. 4. 2.
Mutex를 이용해서 1개의 프로세스만 동작하도록 하기 Mutex를 이용해서 1개의 프로그램만 실행할 수 있는 방법을 알아보겠습니다. [RunOneInstance.cs]using System;using System.Linq;using System.Runtime.InteropServices;using System.Reflection;using System.Security.AccessControl;using System.Security.Principal;using System.Threading; namespace CommonLib.Util{ public class RunOneInstance { private Mutex mutex; public bool CreateOnlyOneMutex(string mutexName) { bool canCreateNewMutex .. 2015. 3. 22.
WPF 프로그램 UI 없이 자동으로 종료 되기 어떤 경우에 WPF프로그램이 화면이 안나오고 로직을 수행후 바로 종료되어야 하는 경우가 있습니다. 예를 들어 특정 파일 생성 및 기록 또는 레지스트리에 값을 쓰는 경우 등입니다. 이럴경우에 간단하게 사용하는 방법입니다. Linux 쉘 프로그램과 비슷하다고 생각하면 됩니다. [App.xaml] [App.xaml.cs]using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Linq;using System.Threading.Tasks;using System.Windows; namespace WpfApplication1{ /// /// Interaction logic for App... 2015. 3. 21.