Skip to content

Codeer-Software/Friendly.XamControls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Friendly.XamControls

This library is a layer on top of Friendly, so you must learn that first. But it is very easy to learn.

https://github.com/Codeer-Software/Friendly.Windows

Getting Started

Install Friendly.XamControls from NuGet

PM> Install-Package Friendly.XamControls

https://www.nuget.org/packages/Friendly.XamControls/


Friendly.XamControls defines the following classes.
They can operate the control easily from a separate process.

  • XamCalendarDriver
  • XamComboEditorDriver
  • XamValueEditorDriver
  • XamContentPaneDriver
  • XamDataGridDriver
  • XamDataGridCellDriver
  • XamDataGridCheckCellDriver
  • XamDataGridComboCellDriver
  • XamDataGridTextCellDriver
  • XamDataTreeDriver
  • XamDataTreeCheckNodeDriver
  • XamDataTreeNodeDriver
  • XamDataTreeTextNodeDriver
  • XamDockManagerDriver
  • XamGridDriver
  • XamGridCellDriver
  • XamGridCheckCellDriver
  • XamGridComboCellDriver
  • XamGridTextCellDriver
  • XamOutlookBarDriver
  • XamOutlookBarGroupDriver
  • XamRibbonDriver
  • XamApplicationMenu2010Driver
  • XamApplicationMenu2010ItemDriver
  • XamApplicationMenuDriver
  • XamToolMenuItemDriver
  • XamTabControlDriver
  • XamTabItemDriver

//sample  
var process = Process.GetProcessesByName("Target")[0];  
using (var app = new WindowsAppFriend(process))  
{  
    dynamic main = app.Type(typeof(Application)).Current.Window;  
    var _grid = new XamGridDriver(main._grid);
    
    var cell = _grid.GetCell(2, 1);
    cell.EmulateActivate();
    bool isActive = cell.IsActive;
    
    var cellText = _grid.GetCell(2, 0).AsText();
    cellText.EmulateEdit("abc");
    string text = cellText.Text;
    
    var cellCombo = _grid.GetCell(99, 1).AsCombo();
    cellCombo.EmulateEdit(1);
    cellCombo.EmulateEdit("c");
    text = cellCombo.Text;
    int selectedIndex = cellCombo.SelectedIndex;
    
    var cellCheck = _grid.GetCell(99, 2).AsCheck();
    cellCheck.EmulateEdit(false);
    bool checked = cellCheck.IsChecked;
}

More samples.

https://github.com/Codeer-Software/Friendly.XamControls/tree/master/Project/Test


For other GUI types, use the following libraries:


If you use PinInterface, you map control simple.
https://www.nuget.org/packages/VSHTC.Friendly.PinInterface/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published