분류 전체보기
-
[WPF] Grid, StackPanel, DockPanelC#/WPF 2022. 9. 6. 11:22
Grid Grid가 ColumnDefinition만 지정되어 있다면 밑에는 뚫려있는 상자로 비유가능. 컨트롤의 Width을 ActualWidth로 지정하면 각 Column Width에 맞게 지정되지만 Height을 ActualHeight로 사용하면 Height이 무한대로 지정됨 RowDefinition을 지정해줘야 바닥이 막힌 상자가 만들어져서 ListBox 등 컨트롤의 크기를 지정할때 한계치가 있는 크기지정이 가능 (ActualHeight) StackPanel Control의 Height 크기에 따라 Height가 증가. DockPanel 창의 최대치에 맞게 꽉 채움.
-
[WPF] App.configC#/WPF_예제소스 2022. 9. 5. 19:42
namespace ConnectUDA_Prism.Models { public class AppConfiguration { public static string GetAppConfig(string key) { return ConfigurationManager.AppSettings[key]; } public static void SetAppConfig(string key, string value) { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); KeyValueConfigurationCollection cfgCollection = config.AppSettings.Settings; cf..
-
[WPF]ListBox 내에서 Button Command BindingC#/WPF 2022. 9. 5. 16:09
Command="{Binding DataContext.SelDownload, RelativeSource={RelativeSource AncestorType=UserControl, AncestorLevel=1}}" ListBox 내 DataTemplate의 Button의 인덱스 지정 및 가져오기 LitBox에 추가될 아이템의 Index저장 (SerialIndex) CommandParameter로 ItemsSource의 바인딩 모델의 SerialIndex 바인딩
-
[WPF] foreach ControlC#/WPF_예제소스 2022. 8. 17. 17:47
public MainPage() { InitializeComponent(); this.Loaded += MainPage_Loaded; } void MainPage_Loaded(object sender, RoutedEventArgs e) { foreach (Button button in FindVisualChildren(mainGrid)) { button.Background = new SolidColorBrush(Colors.Black); } } private static IEnumerable FindVisualChildren(DependencyObject depObj) where T : DependencyObject { if (depObj != null) { for (int i = 0; i < Visua..
-
[C#] C++, C# DataTypeC#/기초 2022. 8. 3. 10:24
https://202psj.tistory.com/1249 [C#] C++ 와 C# 형 비교 참조 Converting C++ Data Types to C#================================= ================================= ================================= 출처: https://www.displayfusion.com/Discussions/View/converting-c-data-types-to-c/?ID=38db6001-..202psj.tistory.com https://m.blog.naver.com/white_cap/221054264163 https://learn.microsoft.com/ko-kr/dotnet/f..
-
[C# c/c++라이브러리(dll) 호출C#/기초 2022. 8. 2. 09:46
https://tttsss77.tistory.com/99 C# 에서 C/C++ 라이브러리(dll) API 함수 호출하기 C# 에서 C/C++ 라이브러리(dll) API 함수 호출하기 본 글에서는 C/C++ 로 구현된 라이브러리가 제공하는 API 함수를 C# 어플리케이션에서 호출하는 방법을 설명한다. C/C++ 로 구현된 라이브러리의 tttsss77.tistory.com System.BadImageFormatException: 프로그램을 잘못된 형식으로 로드하려고 했습니다. (예외가 발생한 HRESULT: 0x8007000B) https://jujun.tistory.com/162 32Bit DLL을 64Bit 시스템에서 사용하기 32bit로 만든 DLL를 64bit 시스템에서 사용할 때 나타나는 에러 처리..